24.07.2011, 08:25
Quote:
hi i created a server and i have the garhouse filterscript .and i created houses but players cant use this command /gotohouse [id] .it doesnt work with them .thats my first problem the second one is how do i let players get 1 score per 1 minute ,and score by killing and also score by drift points .i already have a drift points script but the point be shown on screen when i drift but it doesnt go to score!! so please someone help!?!?
|
And for the score every minute:
pawn Код:
SetTimer("GiveAllScore", 60000, 1);//60000 is 1 minute, place this under OnGameModeInit.
forward GiveAllScore();//We need to forward it as it's a callback
public GiveAllScore()//Just place this somewhere [NOT in another callback]
{
for(new i = 0; i < MAX_PLAYERS; i++)//Loop trough all players
{
SetPlayerScore(i, GetPlayerScore(i)+1);//Gets a player score and sets it +1
}
return 1;
}
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)//If your script already has this callback, then you can just copy the contents inside this
{
SetPlayerScore(killerid, GetPlayerScore(killerid)+1);//Set the killerid's score +1
SendClientMessage(killerid, -1, "You received 1 score for killing a player!");//Send them a message to inform them
return 1;
}