Is this possible
#1

If a cop stun the player and jail him, and the player do /payjailfine, he lose then 1000$ how can i make it that the server give the cop 1000$ (the cop that jail that player)
Reply
#2

just make a variable so like it would be

pawn Код:
//on your jail cmd add

SetPVarInt(suspectid, "WhoArrestedMe", playerid);

// then to your pay fine cmd

GivePlayerMoney(playerid, -1000);
GivePlayerMoney(GetPVarInt(playerid, "WhoArrestedMe"), 1000);
//that will give that cop who arrested him $1000 that the suspect pays
Reply
#3

Quote:
Originally Posted by Shady91
just make a variable so like it would be

pawn Код:
//on your jail cmd add

SetPVarInt(suspectid, "WhoArrestedMe", playerid);

// then to your pay fine cmd

GivePlayerMoney(playerid, -1000);
GivePlayerMoney(GetPVarInt(playerid, "WhoArrestedMe"), 1000);// that will give that cop who arrested him $1000 that the suspect pays
Ok thx :P sorry im not really good
Reply
#4

Quote:
Originally Posted by Silox
Quote:
Originally Posted by Shady91
just make a variable so like it would be

pawn Код:
//on your jail cmd add

SetPVarInt(suspectid, "WhoArrestedMe", playerid);

// then to your pay fine cmd

GivePlayerMoney(playerid, -1000);
GivePlayerMoney(GetPVarInt(playerid, "WhoArrestedMe"), 1000);// that will give that cop who arrested him $1000 that the suspect pays
Ok thx :P sorry im a beginner
No problem post your jail and pay fine command here and I'll add it for you if you don't know how to.
Reply
#5

pawn Код:
C:\Documents and Settings\Gebruiker\Bureaublad\GTACity\gamemodes\script.pwn(5970) : error 035: argument type mismatch (argument 1)
pawn Код:
SetPVarInt(PlayerSuspect, "WhoArrestedMe", playerid);
Reply
#6

pawn Код:
SetPVarInt(PlayerSuspect, "WhoArrestedMe", playerid);
if your command is like /jail [id] then the id is called here "PlayerSuspect" you must change this to your id
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)