09.06.2012, 12:10
hello i have a question, i have equip script for RP server, and i want to make it u can use it 50 times then u need to refill it with cmd like /refillequip
Код:
if(strcmp(cmd, "/equip", true) == 0) // By CuervO_NegrO { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pDuty] == 0) { SendClientMessage(playerid,COLOR_GREY,"** You are not On Duty!"); return 1; } if(IsPlayerInRangeOfPoint(playerid, 6, 257.1108,78.0250,1003.6406))//SAPD Lockers { if(PlayerInfo[playerid][pMember] != 1 && PlayerInfo[playerid][pLeader] != 1) { SendClientMessage(playerid,COLOR_GREY,"** This Refill Point is Only for the SAPD"); return 1; } new sapdequip[] = "1\tCadet Patrol\n2\tOfficer Patrol\n3\tDetective Patrol\n4\tMotorcyclist Patrol\n5\tStandard SWAT\n6\tMedium SWAT\n7\tHeavy SWAT\n8\tSharpshooter SWAT\n9\tArmour+Health\n10\tCeremonial Uniform\n11\tDefault\n12\tHigher Ranked"; ShowPlayerDialog(playerid,50,DIALOG_STYLE_LIST,"List of Equips:",sapdequip,"Select","Cancel"); SendClientMessage(playerid, COLOR_GREY,"* REMEMBER, You may not be able to Select EVERYTHING, Each Item needs it's Specified Rank!"); } else if(IsPlayerInRangeOfPoint(playerid, 6, 223.6328,186.8251,1003.0313))//FBI Lockers (Library) { if(PlayerInfo[playerid][pMember] != 2 && PlayerInfo[playerid][pLeader] != 2) { SendClientMessage(playerid,COLOR_GREY,"** This Refill Point is Only for the FBI"); return 1; } new fbiequip[] = "1\tCadet Equipment\n2\tAgent Equipment\n3\tWatching Equipment\n4\tSpy Equipment\n5\tStandard Tactical\n6\tMedium Tactical\n7\tHeavy Tactical\n8\tSharpshooter Tactical\n9\tArmour+Health\n10\tCeremonial Suit\n11\tDefault\n12\tHigher Ranked"; ShowPlayerDialog(playerid,51,DIALOG_STYLE_LIST,"List of Equips:",fbiequip,"Select","Cancel"); SendClientMessage(playerid, COLOR_GREY,"* REMEMBER, You may not be able to Select EVERYTHING, Each Item needs it's Specified Rank!"); } else if(IsPlayerInRangeOfPoint(playerid, 6, 233.4989,123.6518,1003.2188))//Army Lockers { if(PlayerInfo[playerid][pMember] != 3 && PlayerInfo[playerid][pLeader] != 3) { SendClientMessage(playerid,COLOR_GREY,"** This Refill Point is Only for the Army"); return 1; } new armyequip[] = "1\tPrivate Equipment\n2\tSergeant Equipment\n3\tWatching Equipment\n4\tSpy Equipment\n5\tStandard Special Forces\n6\tMedium Special Forces\n7\tHeavy Special Forces\n8\tSniper Tactical\n9\tArmour+Health\n10\tCeremonial Suit\n11\tDefault\n12\tHigher Ranked"; ShowPlayerDialog(playerid,52,DIALOG_STYLE_LIST,"List of Equips:",armyequip,"Select","Cancel"); SendClientMessage(playerid, COLOR_GREY,"* REMEMBER, You may not be able to Select EVERYTHING, Each Item needs it's Specified Rank!"); } new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /equip %d",d,m,y,h,mi,s,sendername, strval(tmp)); CommandLog(string); return 1; } }