03.02.2011, 16:18
@Ihsan-Cingisiz
You code only works for playerid 0, you dont loop through all players
@Topic
The OnPlayerKeyStateChange version
The only disadvantage is that OnPlayerKeyStateChange only works if the player is spawned which results in no update if you arent spawned
You code only works for playerid 0, you dont loop through all players
@Topic
The OnPlayerKeyStateChange version
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if((newkeys & KEY_ACTION) == KEY_ACTION) {
for(newkeys = -1; (++newkeys) != MAX_PLAYERS; )
SetPlayerScore(newkeys, GetPlayerMoney(newkeys));
}
}