CMD:ir(playerid,params[])
{
new id , str[48];
new name[32];
new string[128], aname[MAX_PLAYER_NAME], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid,aname, MAX_PLAYER_NAME);
GetPlayerName(id, pname, MAX_PLAYER_NAME);
format(str, sizeof(str), "contas/%s.ini", name);
if(!DOF2_FileExists(str)) DOF2_CreateFile(str); {
for(new i=0; i<MAX_PLAYERS; i++)
{
if(!IsPlayerConnected(id)) return SendClientMessage(playerid, -1, "[ERRO] ID invalido");
if(isnull(params))return SendClientMessage(playerid, -1, "[ERRO] Uso: /ir [playerid]");
if(pAdmin[i] == 0) return SendClientMessage(playerid,-1,"Voce nao tem permissao para usar este comando");
if(pAdmin[i] >= 1){
new Float:x, Float:y, Float:z;
GetPlayerPos(id, x, y, z);
SetPlayerPos(playerid, x, y,z);
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
SetPlayerInterior(playerid, GetPlayerInterior(id));
format(string, sizeof(string), "{FF0000}(INFO) {FFFFFF}O Admin %s (%d)(») {0000FF}Teleportou ate voce", aname,playerid);
SendClientMessage(id,-1, string);
format(string, sizeof(string), "{FF0000}(INFO) {FFFFFF}Voce teleportou ate(») {0000FF} %s (%d)", pname,id);
SendClientMessage(playerid,-1, string);
}
}
}
return 1;
}
CMD:ir(playerid,params[]) {
if ( isnull(params))
return SendClientMessage(playerid, -1, "[ERRO] ID invalido");
new id = strval(params);
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, -1, "[ERRO] Uso: /ir [playerid]");
if ( pAdmin[playerid] == 0)
return SendClientMessage(playerid,-1,"Voce nao tem permissao para usar este comando");
new Float:x, Float:y, Float:z;
GetPlayerPos(id, x, y, z);
SetPlayerPos(playerid, x, y,z);
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
SetPlayerInterior(playerid, GetPlayerInterior(id));
new nome[24], string[128];
GetPlayerName(playerid, nome, 24);
format(string, sizeof(string), "{FF0000}(INFO) {FFFFFF}O Admin %s (%d)(») {0000FF}Teleportou ate voce", nome, playerid);
SendClientMessage(id,-1, string);
GetPlayerName(id, nome, 24);
format(string, sizeof(string), "{FF0000}(INFO) {FFFFFF}Voce teleportou ate(») {0000FF} %s (%d)", nome, id);
SendClientMessage(playerid,-1, string);
return 1;
}
pawn Код:
|
CMD:ir(playerid,params[]) {
if ( pAdmin[playerid] == 0)
return SendClientMessage(playerid,-1,"Voce nao tem permissao para usar este comando");
if ( isnull(params))
return SendClientMessage(playerid, -1, "[ERRO] Uso: /ir [playerid]");
new id = strval(params);
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, -1, "[ERRO] ID invalido");
if(pAdmin[playerid] >= 1){
new Float:x, Float:y, Float:z;
GetPlayerPos(id, x, y, z);
SetPlayerPos(playerid, x, y,z);
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
SetPlayerInterior(playerid, GetPlayerInterior(id));
new nome[24], string[128];
GetPlayerName(playerid, nome, 24);
format(string, sizeof(string), "{FF0000}(INFO) {FFFFFF}O Admin %s (%d)(») {0000FF}Teleportou ate voce", nome, playerid);
SendClientMessage(id,-1, string);
GetPlayerName(id, nome, 24);
format(string, sizeof(string), "{FF0000}(INFO) {FFFFFF}Voce teleportou ate(») {0000FF} %s (%d)", nome, id);
SendClientMessage(playerid,-1, string);
}
return 1;
}