SA-MP Forums Archive
I need to script something - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I need to script something (/showthread.php?tid=268722)



I need to script something - spaty2 - 13.07.2011

I need to script something like /licenses (id)
but it will be /dlicense (id)
/dlicense means driving license

I need it like this:
format(string, sizeof(string), "CarLicenses/%s.ini", pname);


it will look in sciptfiles/carlicenses if that player is having carlicense

it will show, not passed if there wont be name of player
or it will show PASSED if there will be name of player

Please make this script for me


Re: I need to script something - spaty2 - 13.07.2011

Somenone please?


Re: I need to script something - ||123|| - 13.07.2011

Script request thread


Re: I need to script something - spaty2 - 13.07.2011

I cant find there, what i asked


Re: I need to script something - Kush - 13.07.2011

Quote:
Originally Posted by spaty2
Посмотреть сообщение
I cant find there, what i asked
He's telling you to post there....


Re: I need to script something - spaty2 - 13.07.2011

that thred is closed ... please guys, make this script for me. I tried to make this script, but i dont know how ..


Re: I need to script something - Kingunit - 13.07.2011

Quote:
Originally Posted by spaty2
Посмотреть сообщение
that thred is closed ... please guys, make this script for me. I tried to make this script, but i dont know how ..
I don't think everyone is gonna create a script for you. Just because you don't know how.


Re: I need to script something - Kush - 13.07.2011

Quote:
Originally Posted by spaty2
Посмотреть сообщение
I need to script something like /licenses (id)
but it will be /dlicense (id)
/dlicense means driving license

I need it like this:
format(string, sizeof(string), "CarLicenses/%s.ini", pname);


it will look in sciptfiles/carlicenses if that player is having carlicense

it will show, not passed if there wont be name of player
or it will show PASSED if there will be name of player

Please make this script for me
Reading back at this, you can even do it as an even simpler method. If your using enums to store your variables, simply add CarLicenses and set a value. Therefore checking whether the value is 1, you have a license.


Re: I need to script something - spaty2 - 13.07.2011

You can't write it? I dont know how to make this still of script, i asking for that, because i dunno how to do this things please write it for me, if it is easy, how you say


Re: I need to script something - Kush - 13.07.2011

pawn Код:
enum pInfo
{
    pCarLic
}
new PlayerInfo[MAX_PLAYERS][pInfo];
pawn Код:
CMD:license(playerid, params[])
{
    if(PlayerInfo[playerid][pCarLic] == 1)
    {
        SendClientMessage(playerid, COLOR_WHITE, "You have your license!");
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "Unfortunately, you don't have your license!");
    }
    return 1;
}
Still, you don't need to add a variable in an enum, you can simply create one. But this is still a more affective method as you can store more than 1 variables in an enum.