Sign in to follow this  
Cornel Iulian

test

2 posts in this topic

CMD:oplace(playerid, params[])

{

    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Erroare: Prima data, trebuie sa fii logat.");

 if(PlayerInfo[playerid][pAdmin] < 2) return SCM(playerid,COLOR_ERROR, AdminOnly);

 if(eventobjects > 9) return SCM(playerid,COLOR_WHITE,"{FFB870}You can't place more than 10 objects.");

 new objectid,prize,sendername[30],Float:pX,Float:pY,Float:pZ,string[128];

 if(sscanf(params, "dd",objectid,prize))

 {

  SendClientMessage(playerid, COLOR_WHITE,"Sintaxa: {FFFFFF}/oplace <ObjectID> <Prize>");

  SendClientMessage(playerid, COLOR_WHITE,"[OBJECTS] Cadou: 19054 - 19058 | Glob craciun: 19059 - 19063 | Oua paste: 19341 - 19345");

  return 1;

 }

 if(prize < 50000 || prize > 5000000) return SendClientMessage(playerid, COLOR_WHITE, "Prize must be between $50,000 and $ 5,000,000.");

 GetPlayerName(playerid, sendername, sizeof(sendername));

 GetPlayerPos(playerid,pX,pY,pZ);

 eventobjects++;

 objectevent[eventobjects] = CreatePickup(objectid, 2, pX+2,pY,pZ, -1);

 eventprizeobj[eventobjects] = prize;

 format(string,sizeof(string),"Admin %s[admin:%d] started an event. Object: %d, prize: $%s.",sendername,PlayerInfo[playerid][pSQLID],objectid,FormatNumber(prize));

 ABroadCast(COLOR_RED2, string,1);

 Adminlog(string);

 return 1;

}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this