03.05.2013, 08:08
Hello!
I want to make a duel system and I have a /duel command, but I don't know how to make /accept command...
Duel Command:
Thank you for your help
I want to make a duel system and I have a /duel command, but I don't know how to make /accept command...
Duel Command:
PHP код:
CMD:duel(playerid, params[])
{
new targetid;
new weaponid;
new ammo;
new string[300];
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, COLOR_RED, "ERROR: This Player is Not Connected!");
if(sscanf(params, "uii", targetid, weaponid, ammo)) return SendClientMessage(playerid, COLOR_ORANGE, "Usage: /duel [playerid] [weaponid] [amount]");
format(string, sizeof(string), "[DUEL]: %s Want a Duel With You. Type /accept, To Start The Duel.", GetName(playerid));
SendClientMessage(targetid, COLOR_LIGHTRED, string);
SetPlayerPos(playerid, -1401.9368,1266.0421,1039.8672);
SetPlayerPos(targetid, -1397.5286,1225.9540,1039.8741);
ResetPlayerWeapons(targetid);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, weaponid, ammo);
GivePlayerWeapon(targetid, weaponid, ammo);
GameTextForPlayer(targetid, "~b~GO GO GO!",3000,3);
GameTextForPlayer(playerid, "~b~GO GO GO!",3000,3);
return 1;
}