Changing enume data with a command -
MatZZPL - 05.10.2012
Hi all, i have a little problem. Im trying to create a plugin so that "pUrzednik" types in "/dajkartemoto" ((means give licence)) and gives the ID number he is near the licence. For him to have the licence he has to have "pKartaMotorowerowa" set to 1 as from registration it sets it to 0 as default. I done this somehow then i got too happy and started playing with it and it all f' up !

Thats the bit of my code:
Quote:
CMD:dajkartemoto(playerid, params[])
{
new targetid;
if(PlayerInfo[playerid][pUrzednik] ==0 ) return SendClientMessage(playerid, 0xFFFFFFF,"Nie masz do tego uprawnien");
if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, 0xFFFFFFF,"/dajkartemoto [ID]");
if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, 0xFFFFFFF,"Nie ma tego gracza online!!");
PlayerInfo[playerid][pKartaMotorowerowa] = 1; // to jest zle sobie daje prawko!
return 1;
}
|
And now when i type in /dajkartemoto ID it says "Nie ma tego gracza online" someone please help and i looked at tutorials and stuff but cant find anything simular ;/ also looked at wiki
Re: Changing enume data with a command -
MatZZPL - 05.10.2012
Could anyone help? Don't even need to fix this if you find it easier to write it ur self would like to get it done with as i need to finish this part of the game mode before moving on
Re: Changing enume data with a command -
Red_Dragon. - 05.10.2012
Post in non English forums please because i cannot understand you, your English is harsh sorry
Re: Changing enume data with a command -
MatZZPL - 05.10.2012
What part of my english do you not understand? I'll explain it to you as simple as you want it to be..
Re: Changing enume data with a command -
Riddick94 - 05.10.2012
pawn Код:
PlayerInfo[playerid][pKartaMotorowerowa] = 1;
zamień na [targetid], ktуry używasz ze sscanf'a. Myśl co robisz i następnym razem użyj albo translatora albo idź do Polskiego forum, bo ciężko jest Ciebie zrozumieć po Angielsku.
@Red_Dragon, i told him to go to the Polish language forum. It's pretty hard to read his English. Maybe he used Whirlpool hash? o.o
Re: Changing enume data with a command -
MatZZPL - 05.10.2012
I changed this "PlayerInfo[playerid][pKartaMotorowerowa] = 1;" to "PlayerInfo[targetid][pKartaMotorowerowa] = 1;" and i still get "Nie masz do tego uprawnien"

Any other ideas?
Btw sorry about the topic, i just wrote it really quick that's why it came out unreadable.. :/
Should of taken more time with writing it out
@Riddick94 masz moze jakis inny pomysl co jest zle?
Re: Changing enume data with a command -
Red_Dragon. - 05.10.2012
Okay but he must give more information
Re: Changing enume data with a command -
MatZZPL - 05.10.2012
Pretty much i want to create a person who gives out licence by typing /dajkartemoto. That means by typing /dajkartemoto ID this person will change the ID's enum "pKartaMotorowerowa 0" to "pKartaMotorowerowa 1".
@edit
That's what i want this bit of code to do, if you can't fix my code id be more then happy if you made your own one and i could learn from it.
@Riddick94 Jak nie wiesz jak moj kod naprawic moze napiszesz swoj taki podstawowy a ja sie cos naucze z niego?
Re: Changing enume data with a command -
Red_Dragon. - 05.10.2012
And what is the problem with that ?
Re: Changing enume data with a command -
Riddick94 - 05.10.2012
Quote:
And now when i type in /dajkartemoto ID it says "Nie ma tego gracza online" someone please help and i looked at tutorials and stuff but cant find anything simular ;/ also looked at wiki
|
Earlier you told that the message was: "Nie ma tego gracza". Now you have "Nie masz do tego uprawnien" message. So.. your "pUrzednik" var must be set to 0 if you can't use. Change your variable to 1 then.
@Red_Dragon, he got a problem with giving a player Driving Licence. There was a mistake with [playerid]. Now he have a message "Nie masz do tego uprawnień" so he got another error message. As we see.. the error is obvious.