I have One good idea but I dont know how to make it
#1

plss help me with this.

I wanna make that player need to buy/make passport so they can cross to other city's (LV,SF)

I can make the gate and other but I cant make the command that sells/makes passport to player , and the command that check if player have the passport.

plss help
Reply
#2

Make this post with my cellphone, so I might do something wrong.

On top if the script, put this.

pawn Код:
new playerhavepassport[MAX_PLAYERS];
Now, under OnPlayerCommandText, add this.

pawn Код:
if(strcmp("/buypassport", cmdtext, 12) == 0)
{
if(playerhavepassport[playerid] == 0)
{
GivePlayerMoney(playerid, -1000);

SendClientMessage(playerid, YOUR_DEFINED_COLOR, "You have buy a passport!");

playerhavepassport[playerid]=1;
}
else
{
SendClientMessage(playerid, YOUR_DEFINED_COLOR, "You already have a passport!");
return 1;
}
return 0;
}
Now, make a checkpoint near the gates objects, and then check if the player have a passport or not, if the player have a passport, then you add 2 timers to open and close the gate.

That's maybe an incomplete tutorial, but I won't script everything for you, you must help yourself .
Reply
#3

That Script is correct [BKR]Lucagrabacr I would do it like that..

Gangasta300 if you want the passport saved, thats another script little harder =)
Reply
#4

I made my script
but theres begun problems ://
I add this to some places in script, but It saves till restart afther that i need to buy again
Код:
format(var, 32, "Putovnica=%d\n",PlayerInfo[playerid][pPutovnica]);fwrite(hFile, var);
Reply
#5

Aha, try use Dini / Y_Ini / MySQL to save your players data then .
Reply
#6

u could use ppvar ints since its jsut a 1 or 0... may slightly slower. It would work though,
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)