|
|
#251 |
|
Big Clucker
![]() ![]() Join Date: Feb 2008
Location: Canada
Posts: 147
Reputation: 7
|
Anti Drive By + Blocks weapons if there synced from the SA-MP bug.
pawn Code:
|
|
|
|
|
|
#252 | |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Jun 2007
Location: Germany
Posts: 2,996
Reputation: 253
|
Quote:
the only improvement is the new function SetPlayerArmedWeapon |
|
|
|
|
|
|
#253 |
|
Banned
![]() Join Date: Jun 2008
Posts: 166
Reputation: 0
|
Useful macros:
Code:
#define isEven(%1) \
(!((%1)&(01)))
Code:
#define isPowerOfTwo(%1) \
(!(%1)&(%1-1))
|
|
|
|
|
|
#254 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Sep 2008
Posts: 318
Reputation: 31
|
Updated RcVehicles system 0.3 samp version.
Code:
IsVehicleRc(vehicleid)
{
switch(GetVehicleModel(vehicleid)){
case 441, 464, 465, 501, 564, 594: return true;
}
return false;
}
Code:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
new
Float:x,
Float:y,
Float:z;
if(newkeys == KEY_SECONDARY_ATTACK )
{
new VehicleSeat = GetPlayerVehicleSeat(playerid);
if(VehicleSeat == -1)
{
for(new forvehicleid; forvehicleid < MAX_VEHICLES; forvehicleid++)
{
if(!IsVehicleRc(forvehicleid)) continue;
GetVehiclePos(forvehicleid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, 6, x, y, z))
{
PutPlayerInVehicle(playerid, forvehicleid, 0);
break;
}
}
}
else if(VehicleSeat == 0)
{
if(IsVehicleRc(GetPlayerVehicleID(playerid)))
{
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x+1, y, z+1.0);
}
}
}
if(newkeys == KEY_FIRE || newkeys == 12 || newkeys == 36)
{
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == 564)
{
new Float:angle;
GetPlayerPos(playerid,x,y,z);
GetVehicleZAngle(GetPlayerVehicleID(playerid), angle);
x += (30 * floatsin(-angle + 5, degrees));
y += (30 * floatcos(-angle + 5, degrees));
CreateExplosion(x,y,z,3,4.0);
}
}
return 1;
}
|
|
|
|
|
|
#255 |
|
Big Clucker
![]() ![]() Join Date: Feb 2008
Location: Canada
Posts: 147
Reputation: 7
|
Anti Non-RP Car jack, Ideal for RP servers.
pawn Code:
|
|
|
|
|
|
#256 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Aug 2008
Posts: 186
Reputation: 0
|
where do i have tho place that code freshkilla ?
|
|
|
|
|
|
#257 | |
|
Godfather
![]() ![]() ![]() ![]() ![]() ![]() Join Date: May 2009
Posts: 7,009
Reputation: 79
|
Quote:
|
|
|
|
|
|
|
#258 |
|
Little Clucker
![]() Join Date: Mar 2009
Posts: 16
Reputation: 0
|
itīs not from me, but this is cool:
Code:
if(strcmp(cmd, "/haha", true) == 0)
{
new player;
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "[USAGE]: /haha [playerid]");
}
player = ReturnUser(tmp);
if (player == playerid)
{
SendClientMessage(player, COLOR_RED, "You canīt laugh at yourself!");
return 1;
}
if(IsPlayerConnected(player))
{
if(player != INVALID_PLAYER_ID)
{
new string[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s laughs at you!", sendername);
SendClientMessage(playerid,COLOR_RED,string);
}
}
return 1;
}
|
|
|
|
|
|
#259 |
|
Big Clucker
![]() ![]() Join Date: May 2009
Posts: 70
Reputation: 7
|
Code:
if(strcmp(cmd, "/haha", true) == 0)
{
new player = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) SendClientMessage(playerid, COLOR_WHITE, "[USAGE]: /haha [playerid]");
if (player == playerid) return SendClientMessage(player, COLOR_RED, "You canīt laugh at yourself!");
if(!IsPlayerConnected(player)) return SendClientMessage(playerid,COLOR_RED,"Invalid Playerid");
new string[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s laughs at you!", sendername);
SendClientMessage(playerid,COLOR_RED,string);
return 1;
}
|
|
|
|
|
|
#260 |
|
Godfather
![]() ![]() ![]() ![]() ![]() ![]() Join Date: May 2009
Posts: 7,009
Reputation: 79
|
This is wrong, this will get the name of the player who used the command and it will send the message to him.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| READ Usefull Links to snippets and other | -Sneaky- | Help Archive | 5 | 02/05/2009 11:22 AM |