06.07.2011, 19:04
try this
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) {
new playername[32];
GetPlayerName(playerid,playername,32);
if(!strcmp(playername, "james", true)) {
SetPlayerColor(playerid,0xFFFFFFFF);
PutPlayerInVehicle(playerid, bus, 0);
}
return true;
}
return true;
}
/*
your code failed because:
if(IsPlayerNPC(playerid)) return 1; // if the player is an NPC then stop reading from this function.
*/
public OnPlayerSpawn(playerid)
{
if(IsPlayerNPC(playerid)) {
new playername[32];
GetPlayerName(playerid,playername,32);
if(!strcmp(playername, "james", true)) {
SetPlayerColor(playerid,0xFFFFFFFF);
PutPlayerInVehicle(playerid, bus, 0);
}
return true;
}
return true;
}
/*
your code failed because:
if(IsPlayerNPC(playerid)) return 1; // if the player is an NPC then stop reading from this function.
*/