/GiveRpp
#1

Hola quiero poner en mi server rol un comando para que de RolePlay Points, pero tengo errores con la id al que se le va a dar el Punto. Por eso nececitaria ayuda de ustedes.

Tengo la base, pero nececito el final digamos jaja.

Код:
if(strcmp(cmdtext, "/giverpp", true) == 0)
{
    if(PlayerInfo[playerid][Level] >= 3)
    {
        if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID)
		{
		    new tmp2[256], Index, player1;
		    tmp2 = strtok(params,Index)
		    player1 = strval(tmp);
		    
    		CMDMessageToAdmins(playerid,"GIVERPP");
			PlayerData[player1][Rpp] = +1;
			format(string, sizeof(string), "You have given a Roleplay Point To %s.", PlayerName2(player1);
			SendClientMessage(playerid,yellow,string);
        	if(player1 != playerid)
				{
				format(string,sizeof(string),"Administrator \"%s\" has given you a Roleplay Point", PlayerName2(playerid);
				SendClientMessage(player1,yellow,string);
   				PlayerData[playerid][Rpp] = +1;
	    		}
  		} else return SendClientMessage(playerid,red,"ERROR: Player is not connected");
  	} else return SendClientMessage(playerid,red,"ERROR: You are not a high enough level to use this command");
	return 1;
}
Reply


Messages In This Thread
/GiveRpp - by [TDL]OGLoc - 07.01.2011, 19:15
Respuesta: /GiveRpp - by [M]xFire - 07.01.2011, 20:09
Re: /GiveRpp - by [TDL]OGLoc - 08.01.2011, 20:20
Respuesta: /GiveRpp - by [M]xFire - 08.01.2011, 21:15
Re: /GiveRpp - by [TDL]OGLoc - 08.01.2011, 21:30
Respuesta: /GiveRpp - by [M]xFire - 08.01.2011, 21:38
Re: /GiveRpp - by [TDL]OGLoc - 08.01.2011, 21:47
Respuesta: /GiveRpp - by [M]xFire - 08.01.2011, 21:53
Re: /GiveRpp - by [TDL]OGLoc - 08.01.2011, 22:00
Respuesta: /GiveRpp - by [M]xFire - 08.01.2011, 22:10

Forum Jump:


Users browsing this thread: 1 Guest(s)