/prender [id]
/curar [id]
/congelar [id]
Antes de Tudo Coloque ao Final do GM:
PAWN Code:
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index <> ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
Agora Coloque Depois de public OnPlayerCommandText:{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index <> ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
PAWN Code:
new cmd[128], idx;
cmd = strtok(cmdtext, idx);
Prender:cmd = strtok(cmdtext, idx);
PAWN Code:
if(strcmp(cmd, "/prender", true) == 0)
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Uso do Comando: /prender ID");
GameTextForPlayer(strval(tmp), "~r~Preso by: DraKoN", 3000, 3);
SetPlayerInterior(strval(tmp), 3);
SetPlayerPos(strval(tmp),198.5319,162.3093,1003.0300);
return 1;
}
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Uso do Comando: /prender ID");
GameTextForPlayer(strval(tmp), "~r~Preso by: DraKoN", 3000, 3);
SetPlayerInterior(strval(tmp), 3);
SetPlayerPos(strval(tmp),198.5319,162.3093,1003.0300);
return 1;
}
Curar:
PAWN Code:
if(strcmp(cmd, "/curar", true) == 0)
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Uso do Comando: /curar ID");
SetPlayerHealth(strval(tmp),100);
return 1;
}
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Uso do Comando: /curar ID");
SetPlayerHealth(strval(tmp),100);
return 1;
}
Congelar:
PAWN Code:
if(strcmp(cmd, "/congelar", true) == 0)
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Uso do Comando: /congelar ID]");
SendClientMessage(strval(tmp), 0xFFFFFFFF, "Congelado Por um Admin");
TogglePlayerControllable(strval(tmp),0);
return 1;
}
{
new tmp[128];
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Uso do Comando: /congelar ID]");
SendClientMessage(strval(tmp), 0xFFFFFFFF, "Congelado Por um Admin");
TogglePlayerControllable(strval(tmp),0);
return 1;
}
Créditos: Dark Team PT
Clique Aqui para Tutorial Original Mais Explicado..