05.12.2010, 19:11
Fiz a base, agora termina.
pawn Код:
if(strcmp(cmd, "/procurar", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pEmprego] != 1)
{
SendClientMessage(playerid, COLOR_GA, "Vocк nгo й um detetive");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COR_CTP, "/procurar [Nick/ID]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Vocк nгo pode se procurar!"); return 1; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
new Float:X,Float:Y,Float:Z;
GetPlayerPos(giveplayerid, X,Y,Z);
SetPlayerCheckpoint(playerid, X,Y,Z, 6);
SetTimer("Checar", 100, true);
ProcurarChecka[playerid] = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_CTP, "Nome ou ID invalido");
}
}
return 1;
}
forward Checar(giveplayerid);
public Checar(giveplayerid)
{
static Float:X,Float:Y,Float:Z;
GetPlayerPos(giveplayerid, X,Y,Z);
SetPlayerCheckpoint(playerid, X,Y,Z, 6);
return true;
}