help me -
grizzley - 06.10.2014
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...
Re: help me -
grizzley - 08.10.2014
Can anyone help me pls?
Re: help me -
grizzley - 09.10.2014
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
Re: help me -
Rudy_ - 09.10.2014
I don't understand you at all :/ Can you explain a bit more?
Re: help me -
YanLanger - 09.10.2014
Explain more?
I don't know what u want.
Re: help me -
grizzley - 09.10.2014
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
Re: help me -
Rudy_ - 09.10.2014
So, how do you detect if anyone has a vehicle on slot 2,3 ?
Re: help me -
grizzley - 09.10.2014
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
Re: help me -
Rudy_ - 09.10.2014
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
When buys on slot 2
And so on, And when player removes vehicles on Any slot e.g slot 3 then
For your script just use
pawn Код:
if(slot3[playerid] == 1)
{
//Player has vehicle on slot 3
}
Re: help me -
grizzley - 09.10.2014
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