pawn Код:
//----------------------------[/v]----------------------------------------------
if(strcmp(cmd, "/v", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new tmp[256];
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COR_BRANCO, "USO: /v [carid] [cor1] [cor2]");
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COR_BRANCO, "O id do veiculo tem que ser entre 400 e 611!"); return 1; }
tmp = strtok(cmdtext, idx);
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COR_BRANCO, "O id da cor й entre 0 e 126!"); return 1; }
tmp = strtok(cmdtext, idx);
new color2;
color2 = strval(tmp);
if(color2 < 0 || color2 > 126) return SendClientMessage(playerid, COR_BRANCO, "O id da cor й entre 0 e 126!");
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
CreateVehicle(car, X,Y+2,Z, 0.0, color1, color2, 1500000);
SetVehicleVirtualWorld(car, GetPlayerVirtualWorld(playerid));
LinkVehicleToInterior(car, GetPlayerInterior(playerid));
}
return 1;
}
//-------------------------------[SETHP]----------------------------------------
if(strcmp(cmd, "/darvida", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new tmp[256];
new tmp2[256];
tmp = strtok(cmdtext, idx);
new otherplayer = ReturnUser(tmp);
tmp2 = strtok(cmdtext, idx);
new hp = strval(tmp2);
if(!strlen(tmp)) return SendClientMessage(playerid, COR_BRANCO, "USO: /setarhp [playerid] [quantidade]");
if(!strlen(tmp2)) return SendClientMessage(playerid, COR_BRANCO, "USO: /setarhp [playerid] [quantidade]");
if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, COR_BRANCO, "[ID INVALIDO]");
SetPlayerHealth(otherplayer, hp);
}
return 1;
}
//------------------------------[SETCOLETE]--------------------------------------
if(strcmp(cmd, "/darcolete", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new tmp[256];
new tmp2[256];
tmp = strtok(cmdtext, idx);
new otherplayer = ReturnUser(tmp);
tmp2 = strtok(cmdtext, idx);
new hp = strval(tmp2);
if(!strlen(tmp)) return SendClientMessage(playerid, COR_BRANCO, "USO: /darcolete [playerid] [quantidade]");
if(!strlen(tmp2)) return SendClientMessage(playerid, COR_BRANCO, "USAGE: /darcolete [playerid] [quantidade]");
if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, COR_BRANCO, "[ID INVALIDO]");
SetPlayerArmour(otherplayer, hp);
}
return 1;
}
//-----------------------[Dar Dinheiro]-------------------------------------------
if(strcmp(cmd, "/dardinheiro", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new string[256];
new tmp[256];
new tmp2[256];
tmp = strtok(cmdtext, idx);
new otherplayer = strval(tmp);
tmp2 = strtok(cmdtext, idx);
new money = strval(tmp2);
if(!strlen(tmp)) return SendClientMessage(playerid, COR_BRANCO, "USO: /dardinheiro [playerid] [quantidade]");
if(!strlen(tmp2)) return SendClientMessage(playerid, COR_BRANCO, "USO: /dardinheiro [playerid] [quantidade]");
if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, COR_BRANCO, "[ID INVALIDO]");
GivePlayerMoney(otherplayer, money);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "O Administrador \"%s\" Lhe Deu: %d Reais", sendername, money);
SendClientMessage(otherplayer, COR_VERDE, string);
}
return 1;
}
//----------------------------[Set Skin]----------------------------------------
if(strcmp(cmd, "/setarskin", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new tmp[256];
new tmp2[256];
tmp = strtok(cmdtext, idx);
new otherplayer = strval(tmp);
tmp2 = strtok(cmdtext, idx);
new skin = strval(tmp2);
if(!strlen(tmp)) return SendClientMessage(playerid, COR_BRANCO, "USO: /setarskin [playerid] [SkinId]");
if(!strlen(tmp2)) return SendClientMessage(playerid, COR_BRANCO, "USO: /setarskin [playerid] [SkinId]");
if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, COR_BRANCO, "[ID INVALIDO]");
SetPlayerSkin(otherplayer, skin);
SendClientMessage(otherplayer, COR_BRANCO, "Um Admin Mudou Sua Skin .");
}
return 1;
}
//-----------------------------[Say]--------------------------------------------
if(strcmp(cmd, "/av", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new string[256];
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result)) return SendClientMessage(playerid, COR_AMARELO, "USO: /av [Texto]");
format(string, sizeof(string), "[Anuncio Do Administrador] %s: %s",sendername,result);
SendClientMessageToAll(ROSA, string);
}
return 1;
}
//----------------------------[/an]----------------------------------------------
if(strcmp(cmd, "/an", true) == 0)
{
new string[256];
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result)) return SendClientMessage(playerid, COR_BRANCO, "Use: /an [Texto]");
format(string, sizeof(string), "[Anuncio] %s: %s",sendername,result);
SendClientMessageToAll(COR_AMARELO, string);
GivePlayerMoney(playerid,-100);
return 1;
}
//-------------------------[akill]----------------------------------------------
if(strcmp(cmd, "/matar", true) == 0)
{
if(IsPlayerAdmin(playerid))
{
new tmp[256];
tmp = strtok(cmdtext, idx);
new otherplayer = strval(tmp);
if(!strlen(tmp)) return SendClientMessage(playerid, COR_BRANCO, "USO: /matar [playerid]");
if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid, COR_BRANCO, "[ID ERRADO]");
SetPlayerHealth(otherplayer, 0);
}
return 1;
}