10.09.2012, 19:15
Quote:
pawn Код:
|
Anyway could you help me with this one? Its not giving a player +1 if you do /rep to him
pawn Код:
dcmd_rep(playerid,params[])
{
new repID, repName[MAX_PLAYER_NAME],name[24],str[128],str1[128];
if(reptimer[playerid] > 0) return SendClientMessage(playerid, white,"{FF0000}You have already gave someone a rep. Please wait before using it again");
if(sscanf(params,"u",repID)) return SendClientMessage(playerid, white,"{FFFF00}Usage: /rep [PlayerID]");
if(!IsPlayerConnected(repID)) return SendClientMessage(playerid, white,"{FF0000}>>Player is not online");
if(repID == playerid) return SendClientMessage(playerid, white,"{FF0000}>> You can't give yourself a reputation");
PlayerInfo[repID][Reps]++;
reptimer[playerid] = SetTimerEx("reptimer1",1200000,true,"i",playerid);
GetPlayerName(playerid,name,24);
GetPlayerName(repID,repName,sizeof(repName));
format(str,sizeof(str),"%s(%d) has gave 1 reputation point to you.",name,playerid);
SendClientMessage(repID,green,str);
format(str1,sizeof(str1),"You have gave %s(%d) 1 reputation point.",repName,repID);
SendClientMessage(playerid,green,str1);
return 1;
}