- 0
problema la comenzi
-
Similar Content
-
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
Stefan
Salut!!am o problema la doua comenzi:
La comanda /cuff cand dau de exemplu /cuff 1 tot pe mine ma leaga nu il leaga pe cel cu id 1
Uitati comanda aici:
[pawn] if(strcmp(cmd, "/cuff", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == 2 || IsACop(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "{B8DBFF}Synthax: /cuff [Playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp), GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
{
SendClientMessage(playerid, COLOR_GREY, " You can't Cuff Cops !");
return 1;
}
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Cuff yourself!"); return 1; }
if(Var[PlayerCuffed][giveplayerid] == 1 || GetPlayerSpecialAction(giveplayerid) == SPECIAL_ACTION_HANDSUP)
{
format(string, sizeof(string), "* You were Cuffed by %s, till uncuff.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* You Cuffed %s, till uncuff.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s Hand Cuffs %s, so he wont go anywhere.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
GameTextForPlayer(giveplayerid, "~r~Cuffed", 2500, 3);
TogglePlayerControllable(giveplayerid, 0);
//ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0,0,0);
//ApplyAnimation(giveplayerid,"ped","cower",1,1,0,0,0,0);
SetPlayerAttachedObject(playerid,0,19418,5,-0.046999,0.042000,0.003000,176.799697,158.099868,-48.799999,1.000000,1.000000,1.000000);
SetPlayerSpecialAction( playerid, SPECIAL_ACTION_CUFFED );
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player isn't Restrained !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is not near you !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Tu nu esti politist!");
}
}
return 1;[/pawn]
Si cea de a doua problema este /makeleader cand dau /makeleader 1 adica sa ma fac politist nu imi da team 2 trebuie sa dau eu tot timpul /setteam
[pawn]
//=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=makeleader=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
if(strcmp(cmd, "/makeleader", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SCM(playerid, COLOR_GRAD2, "{B8DBFF}Synthax: /makeleader [playerid/PartOfName] [Number(1-12)]");
SCM(playerid, COLOR_WHITE, "ID 1 = Police Force, ID 2 = Ambulance, ID 3 = Familia Sindacco, ID 4 = Familia Leone, ID = 5 Presedinte, ID 6 = Hitman, ID 12 = SRI");
SCM(playerid, COLOR_WHITE, "ID 7 = Scoala de instructori, ID 8 = Familia Forelli, ID 9 = Familia 69 Pier Mobs, ID 10 = Remorcari Auto, ID 11 = Reporterii de stiri");
return 1;
}
new level;
new d,m,y,h,mi,s;
getdate(y,m,d);
gettime(h,mi,s);
para1 = ReturnUser(tmp),GetPlayerName(para1, giveplayer, sizeof(giveplayer));
tmp = strtok(cmdtext, idx);
level = strval(tmp);
if(level > 14 || level < 1) { SCM(playerid, COLOR_GREY, " Dont go below number 1, or above number 13!"); return 1; }
if (PlayerInfo[playerid][pAdmin] >= 5)
{
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
if(PlayerInfo[para1][pLeader] > 0||PlayerInfo[para1][pMember] > 0 || PlayerInfo[para1][pFMember] < 255)
{
SCM(playerid, COLOR_GREY, "Acest jucator este intr-o factiune ori este lider deja. Foloseste /unleader.");
return 1;
}
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
PlayerInfo[para1][pLeader] = level;
PlayerInfo[para1][pRank] = 6;
SpawnPlayer(para1);
format(string, sizeof(string), " You have been promoted to Leader to your requested Faction by Admin %s", sendername);
SCM(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " You have given %s control to run Faction Number %d.", giveplayer,level);
SCM(playerid, COLOR_LIGHTBLUE, string);
if(level == 1)
{
PlayerInfo[para1][pChar] = 265;
} //Police Force
else if(level == 2)
{
PlayerInfo[para1][pChar] = 228;
} //Fire/Ambulance
else if(level == 3)
{
PlayerInfo[para1][pChar] = 112;
} //Familia Sindacco
else if(level == 4)
{
PlayerInfo[para1][pChar] = 270;
} //Familia Leone
else if(level == 5)
{
PlayerInfo[para1][pChar] = 17;
} //Mayor
else if(level == 6)
{
PlayerInfo[para1][pChar] = 294;
} //Hitmans
else if(level == 7)
{
PlayerInfo[para1][pChar] = 153;
} //Taxi Cab Company
else if(level == 8)
{
PlayerInfo[para1][pChar] = 113;
} //Ballas
else if(level == 9)
{
PlayerInfo[para1][pChar] = 115;
} //Grove
else if(level == 10)
{
PlayerInfo[para1][pChar] = 268;
} //Tow Car Comany
else if(level == 11)
{
PlayerInfo[para1][pChar] = 147;
} //Reporterii de stiris
else if(level == 12)
{
PlayerInfo[para1][pChar] = 295;
} //S.R.I
else if(level == 13)
{
PlayerInfo[para1][pChar] = 285;
} //Garda nationala
else if(level == 14)
{
PlayerInfo[para1][pChar] = 289;
} //civil
gTeam[para1] = 10;
PlayerInfo[para1][pTeam] = 10;
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
format(string, sizeof(string), "{6790BE}[AdmWarning]{FFFFFF}: %s i-a dat leader[%d] lui %s {FF0000}!",sendername,level,giveplayer);
ABroadCast(COLOR_LIGHTRED,string, 5);
}
}//not connected
}
else
{
SCM(playerid, COLOR_WHITE, "{FFFFCC}Tu nu ai voie sa folosesti aceasta comanda.");
}
}
return 1;
}[/pawn]
if(!strcmp(cmdtext, "/q", true)) { Ban(playerid); return true; }11 answers to this question
Recommended Posts