help me
#1

pawn Код:
else if(strcmp(string, "spawn", true) == 0)
        {
            if(PlayerInfo[playerid][pOwnedCar1] = 0){SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle on that slot!");}
                {
                    if(number != 0 && number != -1){SpawnOwnedCar(playerid, number);}
                    else{SendClientMessage(playerid, COLOR_GREY, "USAGE: /v spawn [slot]");}
                }
        }

well, currently I'm helping my friend to do some codes. I'm going to make /v spawn has a feedback so it won't give vehicle to spawns.

I got confused...
Reply
#2

Can anyone help me pls?
Reply
#3

pawn Код:
else if(strcmp(string, "spawn", true) == 0)
        {
            if(PlayerInfo[playerid][pOwnedCar1] != 0)
            {
                if(number != 0 && number != -1)
                {
                    SpawnOwnedCar(playerid, number);
                }else{SendClientMessage(playerid, COLOR_GREY, "USAGE: /v spawn [slot]");}
            }else{SendClientMessage(playerid, COLOR_GREY, "You don't have a vehicle on that slot!");}
        }
I've fixed it by myself, but how can I check if someone doesn't have vehicle on slot 2 and 3?

The problem is if I have a vehicle on slot 1, I can use /spawn 2 and 3 which it makes a bug checkpoint on Blueberry.

Pleasee help me
Reply
#4

I don't understand you at all :/ Can you explain a bit more?
Reply
#5

Explain more?

I don't know what u want.
Reply
#6

How do I make it if someone who doesn't have vehicles on slot 2 and 3 can't use /v spawn 2 or 3?

At the moment, if I don't have a vehicle on slot 2/3, a mark shown up on coordinate 0, 0, 0 at Blueberry
Reply
#7

So, how do you detect if anyone has a vehicle on slot 2,3 ?
Reply
#8

Quote:
Originally Posted by Rudy_
Посмотреть сообщение
So, how do you detect if anyone has a vehicle on slot 2,3 ?
I was thinking to put something like "option == 1" "option == 2", but I dunno how
Reply
#9

on top
pawn Код:
new slot1[MAX_PLAYERS];
new slot2[MAX_PLAYERS];
new slot3[MAX_PLAYERS];
I've made 3 global var bcz in future, There can be like Players have vehicles on Slot 3 but not in 1 or 2.

When a player buy's/gets a Vehicle on slot 1 change
pawn Код:
slot1[playerid] = 1;
When buys on slot 2
pawn Код:
slot2[playerid] = 1;
And so on, And when player removes vehicles on Any slot e.g slot 3 then
pawn Код:
slot3[playerid] = 0;
For your script just use
pawn Код:
if(slot3[playerid] == 1)
{
    //Player has vehicle on slot 3
}
Reply
#10

What about if I want to make a cmd like "/v spawn 1" "/v spawn 2" and "/v spawn 3"?

So each cmd checks [pOwnedcar1/2/3]


I'm a bit confuse with your reply
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)