
GrinningTrout
Members-
Posts
25 -
Joined
-
Last visited
Everything posted by GrinningTrout
-
Yes it's for saving all weapons and ammo for player on account data and give the player on spawn the exact same weapons and ammo that he had before he dies/quit (all weapons not the weapon that was in the player hands before he dies)
-
Bad argument @ 'giveWeapon' [Expected number at argument 3, got boolean]
-
function getPedWeapons(ped) ammoPlayer={} playerWeapons = {} for i=2,9 do local amo=getPedAmmoInClip ( source,i) if amo and amo ~= 0 then table.insert(ammoPlayer,amo) setAccountData( getPlayerAccount ( source ),"ammo",amo) end end for i=2,9 do local wep = getPedWeapon(source,i) if wep and wep ~= 0 then table.insert(playerWeapons,wep) setAccountData( getPlayerAccount ( source ),"weapons",wep) end else return false end return playerWeapons end addEventHandler("onPlayerQuit",root,getPedWeapons) addEventHandler("onPlayerWasted",root,getPedWeapons) function poi() wapon=getAccountData( getPlayerAccount ( source ),"weapons") aimo=getAccountData( getPlayerAccount ( source ),"ammo") for i,wapon in ipairs(playerWeapons) do giveWeapon ( source, wapon,aimo) end end addEventHandler("onPlayerLogin",root,poi) addEventHandler("onPlayerSpawn",root,poi) i just give up, can anyone help me in this code, the problem is with the ammo
-
hello can i move info from side to another like iget player name in server-side can i use it in client-side if it doesnt exist in the client-side
-
come on guys , any thing
-
so i want to make lobby like ffs and twisted any tips or how should i start to make it?
-
thnx that works but it gives theplayer just the ammo of the weapon which was in his hands right before dies, i want it to give all the weapons that he has
-
function hp(source) ammo=getPedTotalAmmo(source) weapon=getPedWeapon(source) playeraccount = getPlayerAccount ( source ) setAccountData(playeraccount,"playerWeapon",weapon) setAccountData(playeraccount,"playerammo",ammo) giveWeapon(source,weapon,ammo) end addEventHandler("onPlayerWasted",getRootElement(),hp) addCommandHandler("wer",hp) ---------------------------------------------------------------------- addEventHandler("onPlayerSpawn",getRootElement(),function () playeraccount = getPlayerAccount ( source ) weapon=getAccountData(playeraccount,"playerWapon") ammo=getAccountData(playeraccount,"playerammo") giveWeapon(source,weapon,ammo) end) can u guys fix this to me i want when player die save his weapons and ammo, when spawn give player what he had before die
-
how can i setGravity for only one player ?
-
Using: loadstring But it is a complex process/project, I do not recommend you to start building it. (and no it isn't just loadstring, it is much more than that) can u give me an example ?
-
What do you mean by "start mod" and "some players"? i mead start mod like deathmatch, race.... like arena.
-
so, if i need make script that start mod for some players (not all players) what function should i use?
-
--Client-side Button1 = guiCreateButton( 0.7, 0.3, 0.2, 0.1, "Outp11ut!", true ) function wuy() showCursor(true) end addCommandHandler("y",wuy) addEventHandler("onClientGUIClick",resourceRoot,function () if (source == Button1) then triggerServerEvent ( "onPlayerClick",localPlayer) end end) Server-Side addEvent( "onPlayerClick", true ) addEventHandler( "onPlayerClick",resourceRoot,function () if (getPlayerMoney(source) > 100) then setPedArmor(source,50) takePlayerMoney(source,100) else outputChatBox ("you poor",source,150,0,0) end end) triggerClientEvent ( "onClientGUIClick", root)
-
that works wherever i press
-
can you give me an example or add it to my script above i want work when i press button
-
function armmor() setPedArmor(source,50) takePlayerMoney(source,100) end addEventHandler("onPlayerClick",root,armmor,left,down,button) that work wherever i press, how can i make it work only when i press the button
-
ok thnx, last question can i write addEventHandler("onClientGUIClick", Button,armmor) in client script and the function armmor in server script ?
-
hi guys, i'm new here , and just want to know how do I know the errors in my client script . and don't understand that elements thing cuz sometimes for player I use source,theplayer,player , root, (i try them all) and sometimes none of them works (sorry about my English)