Help - cmdtext,idx
#1

Код HTML:
CMD:SPP(playerid,params)
{
	if(Player[playerid][pAdmin] < 2)
	{
		new Float:x1, Float:y1, Float:z1, Float:Ang;
		new Array[7][128];
		Array[0] = strtoko(cmdtext, idx, ',');
		x1 = floatstr(Array[0]);
		if(!strlen(Array[0]))  
		{
			Array[1] = strtoko(cmdtext, idx, ',');
			y1 = floatstr(Array[1]);
			Array[2] = strtoko(cmdtext, idx, ',');
			z1 = floatstr(Array[2]);
			Array[3] = strtoko(cmdtext, idx, ',');
			Ang = floatstr(Array[3]);
			new tmpcar = GetPlayerVehicleID(playerid);
			if(IsPlayerInAnyVehicle(playerid) || gbug_PutPlayerInVehicle(playerid, tmpcar, 1))
			{   
				SetVehiclePos(tmpcar,x1,y1,z1);
				SetVehicleZAngle(tmpcar, Ang);
			}
				else
			{ 
				SetPlayerPos(playerid,x1,y1,z1);
				SetPlayerFacingAngle(playerid, Ang);
			}
			new string[4];
			format(string, sizeof(string),  "{89ffe2}SetPos{ffffff}(%d, %.4f, %.4f, %.4f) - {89ffe2}SetAngle{ffffff}((%.4f)", playerid, x1, y1, z1, Ang);
			SendClientMessage(playerid, COLOR_GREEN, string);
		}
		else  
		{
			SendClientMessage(playerid, COLOR_GRAYWHITE, " {ffffff}/SetPlayerPosEx {ffd1d2}[X],[Y],[Z]");
		}
	}
	else
	{
		SendClientMessage(playerid, COLOR_GRAYWHITE, " {ffffff}Ban khong phai admin");
	}
	return 1;
}
Код HTML:
C:\Documents and Settings\Admin\My Documents\Downloads\123\gamemodes\dayz.pwn(3362) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Admin\My Documents\Downloads\123\gamemodes\dayz.pwn(3366) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Admin\My Documents\Downloads\123\gamemodes\dayz.pwn(3368) : error 017: undefined symbol "cmdtext"
C:\Documents and Settings\Admin\My Documents\Downloads\123\gamemodes\dayz.pwn(3370) : error 017: undefined symbol "cmdtext"
Reply
#2

Код HTML:
C:\Documents and Settings\Admin\Desktop\123\gamemodes\dayz.pwn(3350) : error 017: undefined symbol "GetPlayerNameEx"
C:\Documents and Settings\Admin\Desktop\123\gamemodes\dayz.pwn(3351) : warning 217: loose indentation
C:\Documents and Settings\Admin\Desktop\123\gamemodes\dayz.pwn(3351) : error 035: argument type mismatch (argument 2)
Код HTML:
CMD:cc(playerid, params[])
{
    if(Player[playerid][pAdmin] < 0)
    {
          for(new i = 0; i < 100; i++)
          {
              SendClientMessageToAll(-1, " ");
          }
          new string[128], giveplayerid;
          format(string, sizeof(string), "[SYSTEM] %s da lam sach Chat Box. Thank You <3", GetPlayerNameEx(playerid));
         SAM(giveplayerid, COLOR_LIGHTBLUE, string);
    }
    return 1;
}
Help
Reply
#3

That's a good example for the why you should not just copy and paste into your gamemode, thanks.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)