PayDay Question
#1

is there a way to make..so if a player has sultan or/and elegy,infernus,bullet,jester at payday to give him -100k?
Reply
#2

Ofcourse, you will need to do a check if the player has one of those cars ID.
https://sampwiki.blast.hk/wiki/Vehicle_Model_ID_List
Reply
#3

pawn Код:
new carid = GetPlayerVehicleID(playerid);
     if(GetVehicleModel(carid) = 560) GivePlayerMoneyEx(playerid, -5000);
Add it to your payday stock / public. It will take 5K if the player drives a sultan while the paycheck.

This is what I understond maby you mean't if he owns the vehicle..
Reply
#4

if he owns the vehicle ..
Reply
#5

You'll have to sync your vehicle system and payday system. That could be difficult if you're a beginner.
Reply
#6

I don't know how..can you show an example??i don't even know what sync means..



EDIT:vehicles owned. I want to be at payday -100k
Reply
#7

Quote:
Originally Posted by Akcent_Voltaj
Посмотреть сообщение
I don't know how..can you show an example??i don't even know what sync means..



EDIT:vehicles owned. I want to be at payday -100k
Show your system

System vehicle & payday !
Reply
#8

do it with your vehicle system just for 1 example..
Reply
#9

please help..


PHP код:
new carid GetPlayerVehicleID(i);
                            new 
modelid GetVehicleModel(i);
                            if(
PlayerInfo[carid][pPcarkey] == IsAMasini(modelid) || PlayerInfo[carid][pPcarkey2] == IsAMasini(modelid) || PlayerInfo[carid][pPcarkey3] == IsAMasini(modelid))
                            {
                                
GivePlayerCash(i, -100000);
                                
SendClientMessage(iCOLOR_WHITE"  Asigurare Vehicule: -100000Lei");
                            } 
PHP код:
forward IsAMasini(carid);
                    public 
IsAMasini(carid)
                    {
                    new 
modelid GetVehicleModel(carid);
                    if(
modelid == 451 || modelid == 560 || modelid == 541 || modelid == 495 || modelid == 559 || modelid == 561 || modelid == 562 || modelid == 565 || modelid == 579 || modelid == 429 || modelid == 506)
                    {
                    return 
1;
                    }
                    return 
0;
                    } 
Reply
#10

An example for a common vehicle system would be something like this:
pawn Код:
for(new i=0; i < MAX_VEHICLES; i++)
{
    if(VInfo[i][Model] == DESIRED_MODEL_HERE)
    {
         if(!strcmp(VInfo[i][Owner],GetPlayerNameEx(playerid)))
         {
          //do stuff you want here
         }
    }
}
Just add something like that in your payday function.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)