03.06.2010, 00:57
eu queria aquele comando pra mandar pra HQ,tipo assim : /mandarhq ID
public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/mandarhq", true) == 0)
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Uso do Comando: /mandarhq [ID]");
SetPlayerPos(strval(tmp),COOORDENADAS AQUI);
return 1;
}
return 0;
}
if(strcmp(cmd, "/levarhq", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /calar [playerid/Parte-do-Nick]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
SpawnPlayer(playa);
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo estб autoriazado а usar este comando");
}
}
return 1;
}