Pega JetPack:
- Código:
if(strcmp(cmdtext, "/jetpack", true) == 0){
if(!IsPlayerInAnyVehicle(playerid)) {
SetPlayerSpecialAction(playerid, 2);
} else {
SendClientMessage(playerid, 0xFFF000AA, "Você não pode usar um jetpack dentro de um veículo.");}
return 1;
}
Kit Vip:
- Código:
if(strcmp(cmd, "/kitvip", true) == 0 || strcmp(cmd, "/bvlkit", true) == 0)[size=11][/size]
{[size=11][/size]
new location = PlayerInfo[playerid][pLocal];[size=11][/size]
if(location == 99 || location == 100 || location == 102)[size=11][/size]
{[size=11][/size]
GetPlayerName(playerid, sendername, sizeof(sendername));[size=11][/size]
if(PlayerInfo[playerid][pVIP] >= 2)[size=11][/size]
{[size=11][/size]
new x_kitvip[256];[size=11][/size]
x_kitvip = strtok(cmdtext, idx);[size=11][/size]
if(!strlen(x_kitvip)) {[size=11][/size]
SendClientMessage(playerid, COLOR_WHITE, "|__________________ KitVIP. __________________|");[size=11][/size]
SendClientMessage(playerid, COLOR_WHITE, "|Use: /kitvip [Numero]");[size=11][/size]
SendClientMessage(playerid, COLOR_GREY, "| 1 - Vip's");[size=11][/size]
SendClientMessage(playerid, COLOR_GREY, "| 2 - Vip Premium");[size=11][/size]
SendClientMessage(playerid, COLOR_WHITE, "|____________________________________________ |");[size=11][/size]
return 1; }[size=11][/size]
if(strcmp(x_kitvip,"1",true) == 0)[size=11][/size]
{[size=11][/size]
GivePlayerMoneyEx(playerid,-20000);[size=11][/size]
format(string, sizeof(string), "* O VIP %s Pegou Seu KitVip.", sendername);[size=11][/size]
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);[size=11][/size]
ResetPlayerWeapons(playerid);[size=11][/size]
GivePlayerWeapon(playerid, 24, 100);[size=11][/size]
GivePlayerWeapon(playerid, 30, 300);[size=11][/size]
GivePlayerWeapon(playerid, 29, 300);[size=11][/size]
GivePlayerWeapon(playerid, 25, 30);[size=11][/size]
GivePlayerWeapon(playerid, 4, 1);[size=11][/size]
GivePlayerWeapon(playerid, 34, 30);[size=11][/size]
SetPlayerArmour(playerid, 50);[size=11][/size]
SetPlayerHealth(playerid, 100);[size=11][/size]
SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitVip!");[size=11][/size]
return 1;[size=11][/size]
}[size=11][/size]
if(strcmp(x_kitvip,"2",true) == 0)[size=11][/size]
{[size=11][/size]
if(PlayerInfo[playerid][pVIP] >= 3)[size=11][/size]
{[size=11][/size]
format(string, sizeof(string), "* O VipPremium %s Pegou Seu KitPremium.", sendername);[size=11][/size]
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPL E,COLOR_PURPLE);[size=11][/size]
ResetPlayerWeapons(playerid);[size=11][/size]
//GivePlayerWeapon(playerid, 18, 2);[size=11][/size]
GivePlayerWeapon(playerid, 46, 1);[size=11][/size]
GivePlayerWeapon(playerid, 24, 750);[size=11][/size]
GivePlayerWeapon(playerid, 31, 1500);[size=11][/size]
GivePlayerWeapon(playerid, 29, 1000);[size=11][/size]
GivePlayerWeapon(playerid, 25, 250);[size=11][/size]
//GivePlayerWeapon(playerid, 27, 100);[size=11][/size]
GivePlayerWeapon(playerid, 4, 1);[size=11][/size]
GivePlayerWeapon(playerid, 1, 1);[size=11][/size]
GivePlayerWeapon(playerid, 34, 250);[size=11][/size]
SetPlayerArmour(playerid, 100);[size=11][/size]
SetPlayerHealth(playerid, 100);[size=11][/size]
SendClientMessage(playerid,COLOR_GREEN,"Voce pegou o seu KitPremium!");[size=11][/size]
return 1;[size=11][/size]
}[size=11][/size]
}[size=11][/size]
}[size=11][/size]
else[size=11][/size]
{[size=11][/size]
SendClientMessage(playerid, COLOR_LIGHTRED, "Este comando não existe.");[size=11][/size]
}[size=11][/size]
}[size=11][/size]
else[size=11][/size]
{[size=11][/size]
SendClientMessage(playerid, COLOR_LIGHTRED, "Você não está em uma loja de armas.");[size=11][/size]
}[size=11][/size]
}
Contador de players e quanto sobrou de slots:
- Código:
if(!strcmp(cmdtext, "/PlayerS", true))
{
new
string[128],
Players = 0
;
for(new i = 0; i < GetMaxPlayers(); i++)
{
if(IsPlayerConnected(i))
{
Players++;
}
}
format(string, sizeof(string),"Player Connectados: %d/%d, Sobrando: %d Slots",Players,GetMaxPlayers(),GetMaxPlayers() - Players);
SendClientMessage(playerid,Branco,string);
return true;
}