20.10.2012, 17:58
Hi everyone, i'm going to explain it quick and simple soo.. This is a code to degrade someone..
I tried to edit this 100's of time but keep on failing. What im trying to do is edit this so that a [pMember] == 20 can edit someones driving licence which is [pDrivLic] and set the value to 1.
I know how to to do it in ZCMD, but this is completely different and i need to use this
Could anyone edit this for me and explain how he did it? Would be very thankful and obviously +rep for help
PHP код:
if(strcmp(cmd, "/makeciv", true) == 0)
{
if(IsPlayerConnected(playerid)) {
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /makeciv [playerid/PartOfName] ");
return 1;
}
new para1;
para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
if (RankRequire(playerid)) {
if(PlayerInfo[playerid][pMember] == 1) {
if(IsPlayerConnected(para1)) {
if(para1 != INVALID_PLAYER_ID) {
if(PlayerInfo[para1][pGuard] == 1) {
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
GiveNameSpace(sendername);
GiveNameSpace(giveplayer);
PlayerInfo[para1][pGuard] = 0;
PlayerInfo[para1][pModel] = 47;
SetPlayerSkinEx(para1,47);
format(string, sizeof(string), " You have been demoted to a regular civilian by: %s", sendername);
SendClientMessage(para1, COLOR_WHITE, string);
format(string, sizeof(string), "You have been demoted %s to a regular civilian", giveplayer);
SendClientMessage(playerid, COLOR_WHITE, string);
}
}
}
} //not connected
}
else {
SendClientMessage(playerid, COLOR_GRAD1, " you are not authorized to use that command!");
}
}
return 1;
}
I know how to to do it in ZCMD, but this is completely different and i need to use this
Could anyone edit this for me and explain how he did it? Would be very thankful and obviously +rep for help