27.09.2012, 14:49
Quote:
I canґt actually see you defining or doing anything with "wep1, wep2, wep3" , thats why you get the wrong ID I guess.
|
Ohh you mean this?
pawn Код:
stock AddToDuel(playerid, Float:X, Float:Y, Float:Z, Float:A, interior, world, wep1, wep2, wep3)
{
IsPlayerInDM[playerid] = 1;
KillTimer(DuelTimer[playerid]);
SetPlayerArmour(playerid, 0);
SetPVarInt(playerid, "CMDDisabled", 3);
SetPVarInt(playerid, "CDTick", 0);
SetPVarInt(playerid, "InDuel", 1);
SetPVarInt(playerid, "ArmourReport", 1);
SetPVarInt(playerid, "DInvited", 0);
SetPlayerPosEx(playerid, X, Y, Z, A, interior, world);
SetPlayerHealth(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, wep1, 50000);
GivePlayerWeapon(playerid, wep2, 50000);
GivePlayerWeapon(playerid, wep3, 50000);
TogglePlayerControllable(playerid, 0);
SetCameraBehindPlayer(playerid);
DuelTimer[playerid] = SetTimerEx("DuelCDUpdate", 1000, 1, "i", playerid);
return 1;
}