BIG BUG CANT FIX
#1

IT KILLS ME NOT THE PERSON WHOS NOT ANNA_CORTEZ WTF
Quote:

stock PlayerName(playerid)
{
new PlrName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlrName,sizeof(PlrName));
return PlrName;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{

if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
new VehicleID = GetPlayerVehicleID(playerid);

if(VehicleID == xxannajpxx)
{

if(strcmp(PlayerName(playerid), "Anna_Cortez", true) != 0)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "You dare touch The car of Anna_Cortez? PERISH IN HELL!!! ");
SendClientMessage(playerid, COLOR_RED, "Nucleur Warheads provided by U.S. have been automatically targeted at your head");
SetTimer("dday", 6000, false);
}

}
}

return 1;
}
public dday(playerid)
{
{
{
new Float, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
CreateExplosion(x, y, z, 0, 1.0);
SetPlayerHealth(playerid, 0);
}
}
return 1;
}

Reply
#2

don't use CAPS!
Reply
#3

Change for it:
pawn Код:
if(strcmp(PlayerName(playerid), "Anna_Cortez", true) == 0)
Reply
#4

I would change it so the function returns before the "explode" part of the script if the name is yours.
I am not sure that you can use a function in strcmp, so perhaps try removing it, see if it works.
also, you need to use SetTimerEx instead of SetTimer.
Код:
new drivername[MAX_PLAYER_NAME];
GetPlayerName(playerid,drivername,sizeof(drivername));

if(!strcmp(drivername, "Anna_Cortez", true)) return 1;

RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_RED, "You dare touch The car of Anna_Cortez? PERISH IN HELL!!! ");
SendClientMessage(playerid, COLOR_RED, "Nucleur Warheads provided by U.S. have been automatically targeted at your head");
SetTimerEx("dday", 6000, false,"d",playerid);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)