SA-MP Forums Archive
Question with Gettime and GetData - 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: Question with Gettime and GetData (/showthread.php?tid=276180)



Question with Gettime and GetData - budelis - 12.08.2011

Hi peoples.Now i need help with time and data.I want to ask how to save time in variable and then how use for ex:

I take pickup,and get when i get him,and when i write /pickuptime and then write,when i pick pickup(this is example.)


Re: Question with Gettime and GetData - budelis - 12.08.2011

any help?


Re: Question with Gettime and GetData - MadeMan - 12.08.2011

pawn Код:
new PickupTime[MAX_PLAYERS][3];
pawn Код:
CMD:pickuptime(playerid, params[])
{
    new msg[128];
    format(msg, sizeof(msg), "Pickup was picked up at %02d:%02d:%02d", PickupTime[playerid][0], PickupTime[playerid][1], PickupTime[playerid][2]);
    SendClientMessage(playerid, -1, msg);
    return 1;
}
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    gettime(PickupTime[playerid][0], PickupTime[playerid][1], PickupTime[playerid][2]);
    return 1;
}