14.06.2015, 12:38
Hello!
I am trying to make a Fine wanted level system for my server , i made it with a pickup and wen a player runs in to it he cleans the stars and removes a ammount of money from them.
This is the script:
__________________________________________________ _______________________________________________
new pickup;
new pickup1;
new pickup2;
public OnGameModeInit()
{
pickup = CreatePickup(19198, 1, 2289.9194,2429.9109,11.2961, 0);
pickup1 = CreatePickup(19198, 1, 1554.3624, -1675.7025, 16.4175, 0);
pickup2 = CreatePickup(19198, 1, -1619.9443, 681.3761, 7.4742, 0);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup, pickup1, pickup2 )
{
SetPlayerWantedLevel(playerid, 0);
SendClientMessage(playerid, COLOR_WHITE,"You Cleaned Your Stars! Slow Down Next Time ");
SendClientMessage(playerid, COLOR_RED,"2000$ Has been reduce from your account");
GivePlayerMoney(playerid, -2000);
}
return 1;
}
__________________________________________________ _______________________________________________
But this give me a problem becouse wenever they run in to it this takes the money even if they dont hve stars, an i wanted to make it like if they hve 1 star it removes 1000$ , 2 stars 2000$ , 3 stars 3000$ untill 6 stars becouse i will make it get arrested if they get + than 6 . If possible i wanted to make this is a msgbox so the player can cancel the process if they just run in by mystake .
Thank You
I am trying to make a Fine wanted level system for my server , i made it with a pickup and wen a player runs in to it he cleans the stars and removes a ammount of money from them.
This is the script:
__________________________________________________ _______________________________________________
new pickup;
new pickup1;
new pickup2;
public OnGameModeInit()
{
pickup = CreatePickup(19198, 1, 2289.9194,2429.9109,11.2961, 0);
pickup1 = CreatePickup(19198, 1, 1554.3624, -1675.7025, 16.4175, 0);
pickup2 = CreatePickup(19198, 1, -1619.9443, 681.3761, 7.4742, 0);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup, pickup1, pickup2 )
{
SetPlayerWantedLevel(playerid, 0);
SendClientMessage(playerid, COLOR_WHITE,"You Cleaned Your Stars! Slow Down Next Time ");
SendClientMessage(playerid, COLOR_RED,"2000$ Has been reduce from your account");
GivePlayerMoney(playerid, -2000);
}
return 1;
}
__________________________________________________ _______________________________________________
But this give me a problem becouse wenever they run in to it this takes the money even if they dont hve stars, an i wanted to make it like if they hve 1 star it removes 1000$ , 2 stars 2000$ , 3 stars 3000$ untill 6 stars becouse i will make it get arrested if they get + than 6 . If possible i wanted to make this is a msgbox so the player can cancel the process if they just run in by mystake .
Thank You