Something wrong with this and ID 0? -
cosbraa - 14.06.2012
HERE is the code.
I am having a weird problem, which I am unsure of what it is.
If, for example, ID 2 is the name Savvy, which I want, then they are the only ones who can use this /partybus command.
That works, but it will only change the colours of ID 0's car if they are in one.
I am not sure what is wrong, but I assume it's something with the ChangeCarColour(playerid) callback I made.
Anyway, all help will be appreciated.
Re: Something wrong with this and ID 0? -
Riddick94 - 14.06.2012
pawn Код:
cmd(partybus, playerid, params[])
{
if(!strcmp(GetName(playerid), "Savvy", true))
return 1;
if(!IsPlayerInAnyVehicle(playerid))
return SendClientMessage(playerid, -1, "You must be in a vehicle for this to work!");
if(GetPlayerVehicleSeat(playerid) != 0)
return SendClientMessage(playerid, -1, "You must be the driver to use this command!");
if(PartyBusOn[playerid])
return SendClientMessage(playerid, -1, "Party Bus is already enabled!");
SendClientMessage(playerid, -1, "Party Bus enabled!");
CCC = SetTimer("ChangeCarColour", 100, true, "d", playerid);
PartyBusOn[playerid] = 1;
return 1;
}
Re: Something wrong with this and ID 0? -
cosbraa - 14.06.2012
Did you even change anything?
Re: Something wrong with this and ID 0? -
Craft. - 14.06.2012
Use this
Код:
* * SendClientMessage(playerid, -1, "Party Bus enabled!");
* * CCC = SetTimer("ChangeCarColour", 100, true, "d", playerid);
* * PartyBusOn[playerid] = 1;
* * return 1;
}
I changed "u" to "d" it will work now
Re: Something wrong with this and ID 0? -
cosbraa - 14.06.2012
Quote:
Originally Posted by Craft.
Use this
Код:
* * SendClientMessage(playerid, -1, "Party Bus enabled!");
* * CCC = SetTimer("ChangeCarColour", 100, true, "d", playerid);
* * PartyBusOn[playerid] = 1;
* * return 1;
}
I changed "u" to "d" it will work now
|
It was always "d".
Re: Something wrong with this and ID 0? -
sampreader - 14.06.2012
settimerex
Re: Something wrong with this and ID 0? -
cosbraa - 14.06.2012
Quote:
Originally Posted by sampreader
settimerex
|
Wow, missed such a simple thing!
Haha, thanks.
Re: Something wrong with this and ID 0? -
Craft. - 14.06.2012
Must have been a bug on my screen sorry