help with invalid id
#4

um.. please a bit of help i have like
pawn Код:
dcmd_Slap(playerid,params[])
{
   if(PlayerData[playerid][AdminLevel] >= 2)
  {
  new tmp[256],idx;
  tmp = strtok(params,idx);
  new pid = strval(tmp);
  new id;
  new reason[64];
  if(!strlen(tmp))

    if (sscanf(params, "uz", id, reason)) SendClientMessage(playerid, COLOR_GREY, "use: /Slap [Player id number]");


    new Float:posX, Float:posY, Float:posZ;
    new pname[MAX_PLAYER_NAME], pname2[MAX_PLAYER_NAME], string[256];
    GetPlayerName(pid,pname,sizeof(pname));
    GetPlayerName(playerid,pname2,sizeof(pname2));
    GetPlayerPos(pid, posX, posY, posZ);
    SetPlayerPos(pid, posX, posY, posZ+5);
    SetCameraBehindPlayer(pid);
    format(string,sizeof(string),"%s got slapped in the face by %s!",pname,pname2);
    SendClientMessageToAll(COLOR_GREEN, string);
}
  else if (playerid == INVALID_PLAYER_ID)SendClientMessage(playerid, COLOR_YELLOW, "not online player");

  else
  {
    SendClientMessage(playerid,COLOR_YELLOW,"not admin level 4");
}
return 1;
}
That being my only try without errors

Yeah, Im stupid (SSCANF)
Reply


Messages In This Thread
help with invalid id - by aaronishello - 10.05.2009, 17:12
Re: help with invalid id - by MenaceX^ - 10.05.2009, 17:15
Re: help with invalid id - by Weirdosport - 10.05.2009, 17:15
Re: help with invalid id - by aaronishello - 10.05.2009, 19:14
Re: help with invalid id - by Weirdosport - 10.05.2009, 20:59

Forum Jump:


Users browsing this thread: 1 Guest(s)