16.08.2010, 12:40
How get that is player shoot? like i want make wehn player 1 shoot he taked off 1 variable.. how make this?
if(newkeys == KEY_FIRE || newkeys == KEY_SECONDARY_FIRE)
{
SetPVarInt(playerid, "Shot", GetPVarInt(playerid, "Shot")-1);
}
if(newkeys == KEY_FIRE || newkeys == KEY_SECONDARY_FIRE)
{
SetPVarInt(playerid, "Shot", GetPVarInt(playerid, "Shot")-1;
}
if(newkeys == KEY_FIRE || newkeys == KEY_SECONDARY_FIRE)
{
SetPVarInt(playerid, "Shot", GetPVarInt(playerid, "Shot")-1);
new file[50], name[20], str[50];
GetPlayerName(playerid, name, 20);
format(file, sizeof(file),"users/%s.ini", name);
new File:account = fwrite(file, io_append);
if(account)
{
format(str, 50, "Shots: %d", GetPVarInt(playerid, "Shot"));
{ fwrite(account, str); }
fclose(account);
}
}