PDA

View Full Version : Getplayerposition Issue


Rodri99
31/12/2015, 11:27 PM
removed.

Donboo
31/12/2015, 11:32 PM
if(!strcmp(playername, "Rodri99", true))
{
GetPlayerPos(GetPlayerID(playername), X, Y, Z);
}

stock GetPlayerID(Name[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
new pName2[MAX_PLAYER_NAME];
GetPlayerName(i, pName2, sizeof(pName2));
if(!strcmp(Name, pName2))
{
return i;
}
}
}
return -1;
}

Happy new year.