- 0
Comanda Gresita
-
Recently Browsing 0 members
- No registered users viewing this page.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.
Question
hopingsteam
Liniile 38195 - 38424
[pawn] if(strcmp(cmd, "/agivelicense", true) == 0 || strcmp(cmd, "/agl", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] >= 1337)
{
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) {
SCM(playerid, COLOR_WHITE, "USAGE: /agivelicense [name] [playerid/PartOfName]");
SCM(playerid, COLOR_WHITE, "Available names: Driving, Pilots, Sailing, Fishing, Weapon ,Passport.");
return 1;
}
if(strcmp(x_nr,"driving",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, COLOR_WHITE, "USAGE: /agivelicense driverslicense [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Drivers License to %s.",giveplayer);
SCM(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Drivers License.",sendername);
SCM(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pCarLic] = 1;
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, " That player is Offline!");
return 1;
}
}
else if(strcmp(x_nr,"Pilots",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, COLOR_WHITE, "USAGE: /agivelicense Pilotslicense [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Pilots License to %s.",giveplayer);
SCM(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Pilots License.",sendername);
SCM(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pFlyLic] = 1;
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, " That player is Offline!");
return 1;
}
}
else if(strcmp(x_nr,"sailing",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, COLOR_WHITE, "USAGE: /agivelicense sailinglicense [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Sailing License to %s.",giveplayer);
SCM(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Sailing License.",sendername);
SCM(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pBoatLic] = 1;
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, " That player is Offline!");
return 1;
}
}
else if(strcmp(x_nr,"fishing",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, COLOR_WHITE, "USAGE: /agivelicense fishinglicense [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Fishing License to %s.",giveplayer);
SCM(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Fishing License.",sendername);
SCM(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pFishLic] = 1;
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, " That player is Offline!");
return 1;
}
}
else if(strcmp(x_nr,"weapon",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, COLOR_WHITE, "USAGE: /agivelicense weaponlicense [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Weapon License to %s.",giveplayer);
SCM(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Weapon License.",sendername);
SCM(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pGunLic] = 1;
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, " That player is Offline!");
return 1;
}
}
else if(strcmp(x_nr,"all",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "Utilizare: /agivelicense all [iD / Nume]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* Ai dat lui %s toate licentele.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s ti-a dat toate licentele.",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pCarLic] = 1;
PlayerInfo[giveplayerid][pBuletin] = 1;
PlayerInfo[giveplayerid][pFlyLic] = 1;
PlayerInfo[giveplayerid][pBoatLic] = 1;
PlayerInfo[giveplayerid][pFishLic] = 1;
PlayerInfo[giveplayerid][pGunLic] = 1;
PlayerInfo[giveplayerid][pPassPort] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline!");
return 1;
}
}
else if(strcmp(x_nr,"passport",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, COLOR_WHITE, "USAGE: /agivelicense PassPort [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a PassPort License to %s.",giveplayer);
SCM(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a PassPort License.",sendername);
SCM(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pPassPort] = 1;
return 1;
}
}
else
{
SCM(playerid, COLOR_GREY, " That player is Offline!");
return 1;
}
}
}
}
return 1;
}
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=setchamp=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
if(strcmp(cmd, "/setchamp", true) == 0)[/pawn]
gggg.pwn(38195) : warning 217: loose indentation
gggg.pwn(38424) : warning 217: loose indentation
Am incercat sa fac singur /agl si imi da erori
(
2 answers to this question
Recommended Posts