[Ajuda] If com GetPlayer Name
#4

pawn Код:
new namec[MAX_PLAYER_NAME];
GetPlayerName(playerid, namecc, MAX_PLAYER_NAME);
DOF2_SetString(file, "Dono", namec); // aki a linha que salva o nome do player
OnPlayerStateChange
pawn Код:
new pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, MAX_PLAYER_NAME);

if (strcmp(DOF2_GetString(file, "Dono"), pname) == 0) {
    SendClientMessage(playerid, 0x00CC00FF, "[ > ]Bem Vindo(a) ao seu veiculo.");
}
else {
    SendClientMessage(playerid, 0x00CC00FF, "[ > ]Este veiculo nao e seu..");
    RemovePlayerFromVehicle(playerid);
}
OBS: Nгo sei ai, mas no caso aqui nгo defini "file", entгo caso nгo tenha feito isso faзa.
Reply


Messages In This Thread
If com GetPlayer Name - by iCracker - 16.05.2013, 00:38
Re: If com GetPlayer Name - by Gii - 16.05.2013, 00:40
Re: If com GetPlayer Name - by iCracker - 16.05.2013, 01:38
Re: If com GetPlayer Name - by Gii - 16.05.2013, 01:45

Forum Jump:


Users browsing this thread: 2 Guest(s)