23.09.2014, 08:23
Код:
if (strcmp("/rcar", cmdtext, true, 10) == 0) { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, sizeof(pName)); new PlayerState = GetPlayerState(playerid); if(strcmp(pName, "Sal", true, sizeof(pName))) { if(PlayerState == PLAYER_STATE_DRIVER) { SendClientMessage(playerid, COLOUR_RED, "You cannot enter your car if you are in a vehicle"); return 1; } else { PutPlayerInVehicle(playerid, SalElegy, 0); return 1; } } return 1; }
Код:
if(strcmp("/sal", cmdtext, true, 10) == 0) { new pName[MAX_PLAYER_NAME]; GetPlayerName(playerid, pName, sizeof(pName)); if(strcmp(pName, "Sal", true, sizeof(pName))) { SetPlayerSkin(playerid, 181); SetPlayerColor(playerid, 0x266464); return 1; } else { SendClientMessage(playerid, COLOUR_RED, "You are not Sal"); return 1; } }