11.06.2011, 05:20
PHP Code:
new org[MAX_PLAYERS];
new socio[MAX_PLAYERS];
public OnPlayerCommandText(playerid, cmdtext[])
{
new tmp[256], idx;
if(strcmp(cmdtext, "/socio", true) == 0)
{
if(socio[playerid] == 1) return SendClientMessage(playerid, -1, "Vocк jб й socio !");
socio[playerid] = 1;
SendClientMessage(playerid, -1, "Vocк acaba de virar um socio.");
return 1;
}
if(strcmp(cmdtext, "/kitsocio", true) == 0)
{
if(socio != 1) return SendClientMessage(playerid, -1, "Vocк nгo й socio.");
GivePlayerWeapon(playerid, 29, 1000);
GivePlayerWeapon(playerid, 31, 1000);
SendClientMessage(playerid, -1, "Vocк ganhou uma MP5 e uma M4 com 1000 balas cada.");
return 1;
}
if(strcmp(cmdtext, "/jetpack", true) == 0)
{
if(socio != 1) return SendClientMessage(playerid, -1, "Vocк nгo й socio.");
SetPlayerSpecialAction(playerid, 2);
SendClientMessage(playerid, -1, "Vocк pegou um jet pack.");
return 1;
}
if(strcmp(cmdtext, "/socios", true) == 0 || strcmp(cmdtext, "/so", true) == 0)
{
if(socio != 1) return SendClientMessage(playerid, -1, "Vocк nгo й socio.");
tmp = strtok(cmdtext, idx);
if(!strlen(texto)) return SendClientMessage(playerid, -1, "USO: /so(cios) [TEXTO]");
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(socio[i] == 1)
{
SendClientMessage(i, -1, tmp);
return 1;
}
}
return 1;
}
if(strcmp(cmdtext, "/org", true) == 0)
{
if(socio != 1) return SendClientMessage(playerid, -1, "Vocк nгo й socio.");
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, -1, "USO: /org [NUMERO DA ORG]");
new n = strval(tmp);
org[playerid] = n;
new str[100];
format(str, 100, "Vocк agora faz parte da ORG %d !", n);
SendClientMessage(playerid, -1, str);
return 1;
}
return 0;
}