public OnPlayerStateChange(playerid, newstate, oldstate) { if(newstate == 2 || newstate == 3) { new VehicleID = GetPlayerVehicleID(playerid); if(VehicleID == Vehicle_01) { new Name[MAX_PLAYER_NAME]; GetPlayerName(playerid, Name, sizeof(Name)); if(strcmp( Name, "HayZatic")) RemovePlayerFromVehicle(playerid); if(strcmp( Name, "HayZatic")) SendClientMessage(0xFFFF2AFF,"Welcome HayZatic");
if(strcmp( Name, "HayZatic")) SendClientMessage(0xFFFF2AFF,"Welcome HayZatic");
if(!strcmp( Name, "HayZatic")) SendClientMessage(0xFFFF2AFF,"Welcome HayZatic");
strcmp function returns 0 if the strings match. So change this
pawn Код:
pawn Код:
|
error 035: argument type mismatch (argument 2)
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == 2 || newstate == 3)
{
new VehicleID = GetPlayerVehicleID(playerid);
if(VehicleID == Vehicle_01)
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, sizeof(Name));
if(strcmp( Name, "HayZatic") == 0) { SendClientMessage(playerid, 0xFFFF2AFF,"Welcome HayZatic"); }
else { RemovePlayerFromVehicle(playerid); }
}
}
return 1;
}