if(strcmp(cmd, "/putgun", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pDonateRank] >= 2) { new gunID = GetPlayerWeapon(playerid); new gunAmmo = GetPlayerAmmo(playerid); PutGunA[GetClosestCar(playerid)] = gunAmmo; PutGun[GetClosestCar(playerid)] = gunID; GivePlayerWeapon(playerid, gunID, -gunAmmo); } } return 1; } if(strcmp(cmd, "/takegun", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pDonateRank] >= 2) { GivePlayerWeapon(playerid, PutGun[GetClosestCar(playerid)],PutGunA[GetClosestCar(playerid)]); PutGunA[GetClosestCar(playerid)] = 0; PutGun[GetClosestCar(playerid)] = 0; } } return 1; } |