03.07.2012, 19:58
Hello, My name is Fadhilkab.I would like to have a Error message.Because many peoples spam/abuse this command.So once they have created a pirate ship, And when they try to create it again they should recieve a error message such as "ERROR:You Already have a ship please do /removeship then only you can create it "
Here is the code
Will Support you By REP++
Thanking you
-Your's own : Fadhil
Here is the code
Will Support you By REP++
Код:
CMD:pirate(playerid, params[]) { { new Float:x,Float:y,Float:z,Float:a; GetPlayerPos(playerid,x,y,z); GetPlayerFacingAngle(playerid,a); piratev[playerid] = CreateVehicle(484,x+3,y+3,z,a,1,1,10000); pirateo[playerid] = CreateObject(8493, 0.195679, 0.113892, -10.283400, 0.0, 0.0, 96.0); LinkVehicleToInterior(piratev[playerid], 10); PutPlayerInVehicle(playerid, piratev[playerid], 0); AttachObjectToVehicle(pirateo[playerid], piratev[playerid], 7.0, 0.0, 16.0, 0.0, 0.0, 0.0); SendClientMessage(playerid, COLOR_YELLOW, "To remove the piratefun do /pirateremove.!"); return 1; } }
Код:
//=====================[PIRATE REMOVE]========================================== CMD:pirateremove(playerid, params[]) { RemovePlayerFromVehicle(playerid); DestroyObject(pirateo[playerid]); DestroyVehicle(piratev[playerid]); GameTextForPlayer(playerid, "~g~Succsessfully destroyed",10000,5); return 1; }
-Your's own : Fadhil