Posts: 80
Threads: 14
Joined: Jun 2010
Can any one help with this ?
i tried to create it with kill spree but it wont work
I mean like if a player is in rhino and if he kills 5 ppl continuously he will be ejected from the vehicle and he needs to wait 2 minutes before going into the any rhino again!
Posts: 80
Threads: 14
Joined: Jun 2010
Thx but it disables the rhino for him only when he kills 5 ppl right ?
Posts: 80
Threads: 14
Joined: Jun 2010
two errors
PHP код:
E:\samp03asvr_R8_win32\gamemodes\newupdateCod.pwn(4418) : error 001: expected token: ";", but found "-identifier-"
E:\samp03asvr_R8_win32\gamemodes\newupdateCod.pwn(4569) : error 001: expected token: ";", but found "public"
And The lines are
RemovePlayerFromVehicle(killerid);
and
public RhinoDisabled(playerid)
Posts: 80
Threads: 14
Joined: Jun 2010
thx Thank you very much worked good no errors
Posts: 80
Threads: 14
Joined: Jun 2010
i tried it but nothing happens after 5 kills
Posts: 2,593
Threads: 34
Joined: Dec 2007
pawn Код:
new carkill[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
carkill[playerid]=false;
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != (-1))
if(IsPlayerInAnyVehicle(killerid))
if(!GetPlayerVehicleSeat(killerid))
if(GetVehicleModel(GetPlayerVehicleID(killerid)) == 432)) // is he in rhino?
carkill[killerid]++;
if(carkill[killerid] >= 5) // he killed more than 5 people with rhino
{
SetTimerEx("RhinoDisabled", 120000, false, "d", killerid);
RemovePlayerFromVehicle(killerid);
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(GetVehicleModel(vehicleid) == 432) // is it a rhino?
if(carkill[playerid]) // is rhino disabled for him?
{
new Float:Pos[3];
GetPlayerPos(playerid,Pos[0],Pos[1],Pos2]);
SetPlayerPos(playerid,Pos[0],Pos[1],Pos2]+2.0);
}
return 1;
}
forward RhinoDisabled(p);
public RhinoDisabled(p) return carkill[p]=false;