17.06.2011, 23:55
Try this
stock's / funcrion's is not supposed to be in other Callbacks
pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(newstate == PLAYER_STATE_DRIVER && oldstate == PLAYER_STATE_ONFOOT)
{
if(vehicleid == valo)
{
if(strcmp(PlayerName(playerid)," Valo_Xhan", true) != 0)
{
RemovePlayerFromVehicle(playerid);
SendClientMessage(playerid, COLOR_GREEN, "This is Valo vehicle!")
}
}
}
return 1;
}
stock PlayerName(playerid)
{
new PlrName[MAX_PLAYER_NAME];
GetPlayerName(playerid,PlrName,sizeof(PlrName));
return PlrName;
}