if(strcmp(cmd, "/darsocio", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id]"); return 1; } new para1; para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); if (PlayerInfo[playerid][pAdmin] >= 1341) { if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); PlayerInfo[para1][pSocio] = 1; format(string, sizeof(string), "Vocк ganhou VIP socio do admin %s", sendername); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), "Vocк deu VIP socio para %s.", giveplayer); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); new celulas[100], Nome[24]; if(!fexist("Socio.log")) return CriarLog("Socio.log"); GetPlayerName(playerid, Nome, 24); format(celulas, sizeof(celulas), "%s deu sуcio para %d", Nome); EscreverLog("Socio.log", celulas); return 1; } } } else { SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!"); } } return 1; } |
if(strcmp(cmd, "/darsocio", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id]");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (PlayerInfo[playerid][pAdmin] >= 1341)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
PlayerInfo[para1][pSocio] = 1;
format(string, sizeof(string), "Vocк ganhou VIP socio do admin %s", sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Vocк deu VIP socio para %s.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
new celulas[100], Nome[24];
if(!fexist("Socio.log")) return CriarLog("Socio.log");
GetPlayerName(playerid, Nome, 24);
format(celulas, sizeof(celulas), "%s deu sуcio para %d", Nome);
EscreverLog("Socio.log", celulas);
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!");
}
}
return 1;
}
da proxima vez use o php
PHP код:
|
if(strcmp(cmd, "/darsocio", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id] [nivel de 1 a 3]");
new para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_GRAD2, "USE: /darsocio [id] [nivel de 1 a 3]");
if (PlayerInfo[playerid][pAdmin] >= 1341)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new socio_nivel = strval(tmp);
PlayerInfo[para1][pSocio] = socio_nivel;
format(string, sizeof(string), "Vocк ganhou VIP socio nнvel %d do admin %s.", socio_nivel, sendername);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "Vocк deu VIP socio nнvel %d para %s.", socio_nivel, giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
new celulas[100], Nome[24];
if(!fexist("Socio.log")) return CriarLog("Socio.log");
GetPlayerName(playerid, Nome, 24);
format(celulas, sizeof(celulas), "%s deu sуcio nнvel %d para %s.", Nome, socio_nivel, giveplayer);
EscreverLog("Socio.log", celulas);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Vocк nгo esta autorizado a usar este comando!");
}
return 1;
}