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);
ProcurarChecka[playerid] = 1;
}
}
else
{
SendClientMessage(playerid, COLOR_CTP, "Nome ou ID invalido");
}
}
return 1;
}
//public public SetPlayerUnjail()
if(ProcurarChecka[i] > 0)
{
new Float:X,Float:Y,Float:Z;
GetPlayerPos(ProcurarChecka, X, Y, Z);
SetPlayerCheckpoint(i, X, Y, Z, 5);
ProcurarChecka[i] += 1;
}
//toppogm
new timer[500];
forward FuckYou(playerid,give);
public FuckYou(playerid,give)
{
if(!IsPlayerConnected(give)) {
KillTimer(timer[playerid]);
return SendClientMessage(playerid, COR_BRANCO, "O Player Desconecto");
}
static Float:X,Float:Y,Float:Z;
GetPlayerPos(give,X,Y,Z);
SetPlayerCheckpoint(playerid, X,Y,Z, 6);
return true;
}
//onplayecommandtext
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd,"/procurar",true) == 0)
{
new tmp[128];
new giveplayerid;
tmp = strtok(cmdtext, idx);
giveplayerid = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid,COR_BRANCO,"USO: /procurar [id]");
if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COR_BRANCO, "id invalido.");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(giveplayerid, X,Y,Z);
SetPlayerCheckpoint(playerid, X,Y,Z, 6);
timer[playerid] = SetTimerEx("FuckYou",4000,true,"ii",playerid,giveplayerid);
return 1;
}
vocк leu por acaso ?
eu quero que o checkpoint que cria na localizaзгo do player, se ele se mexer o checkpoint vai atras aparecendo sу para que usar o cmd. |
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;
}