public OnRconCommand(cmd[])
{
new cmd[256];
new cmd2[256];
new idx;
new idc;
cmd = strtok(cmdtext, idx);
cmd2 = strtok(cmdtext, idc);
new tmp[256];
new tmp2[256];
if(strcmp(cmd, "/sv", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){return SendClientMessage(playerid, COLOR_RED, "BENUTZUNG: /spawnvehikel [modelid]");
}
new modelid = strval(tmp);
GetPlayerPos(playerid, x,y,z);
GetPlayerFacingAngle(playerid, angle);
CreateVehicle(modelid, 1742.7283,-1858.6941,13.4141, angle, 1,1, -1); // Spawnt die Vehikel bei der Unity Station
SendClientMessage(playerid, COLOR_RED, "Vehikel erstellt!");
return 1;
}
if(strcmp(cmdtext, "/dcar", true) == 0)
{
new dcar;
dcar = GetPlayerVehicleID(playerid);
DestroyVehicle(dcar);
return 1;
}
if(strcmp(cmd2, "/giveskin", true, 7 ) == 0) // Geht auch, digga :D
{
tmp2 = strtok(cmdtext, idc);
if(!strlen(tmp2)){return SendClientMessage(playerid, COLOR_RED, "BENUTZUNG: /giveskin [skinid]");
}
new skinid = strval(tmp2);
SetPlayerSkin(playerid, skinid);
return 1;
if (strcmp(cmdtext, "/porthafen", true) == 0) {
SetPlayerPos(playerid,-1573.2271,111.1439,3.5547);//x,y,z sind die coords
return 1;
if (strcmp(cmdtext, "/portmafia", true) == 0) {
SetPlayerPos(playerid,257.1010,-1364.6881,53.1094);//x,y,z sind die coords
return 1;
}
Kann mir jemand das hinbiegen ?
Erros ->[hide]E:\crystixxv3.pwn(160) : warning 219: local variable "cmd" shadows a variable at a preceding level
E:\crystixxv3.pwn(164) : error 017: undefined symbol "strtok"
E:\crystixxv3.pwn(164) : error 033: array must be indexed (variable "cmd")
E:\crystixxv3.pwn(165) : error 017: undefined symbol "strtok"
E:\crystixxv3.pwn(165) : error 033: array must be indexed (variable "cmd2")
E:\crystixxv3.pwn(172) : error 017: undefined symbol "strtok"
E:\crystixxv3.pwn(172) : error 033: array must be indexed (variable "tmp")
E:\crystixxv3.pwn(174) : error 017: undefined symbol "playerid"
E:\crystixxv3.pwn(174) : error 079: inconsistent return types (array & non-array)
E:\crystixxv3.pwn(177) : error 017: undefined symbol "playerid"
E:\crystixxv3.pwn(178) : error 017: undefined symbol "playerid"
E:\crystixxv3.pwn(180) : error 017: undefined symbol "playerid"
E:\crystixxv3.pwn(181) : error 079: inconsistent return types (array & non-array)
E:\crystixxv3.pwn(183) : warning 217: loose indentation
E:\crystixxv3.pwn(183) : error 017: undefined symbol "cmdtext"
E:\crystixxv3.pwn(186) : error 017: undefined symbol "playerid"
E:\crystixxv3.pwn(188) : error 079: inconsistent return types (array & non-array)
E:\crystixxv3.pwn(191) : warning 217: loose indentation
E:\crystixxv3.pwn(193) : error 017: undefined symbol "strtok"
E:\crystixxv3.pwn(193) : error 033: array must be indexed (variable "tmp2")
E:\crystixxv3.pwn(194) : error 017: undefined symbol "playerid"
E:\crystixxv3.pwn(194) : error 079: inconsistent return types (array & non-array)
E:\crystixxv3.pwn(197) : error 017: undefined symbol "playerid"
E:\crystixxv3.pwn(198) : error 079: inconsistent return types (array & non-array)
E:\crystixxv3.pwn(200) : warning 225: unreachable code
E:\crystixxv3.pwn(200) : error 017: undefined symbol "cmdtext"
E:\crystixxv3.pwn(201) : error 017: undefined symbol "playerid"
E:\crystixxv3.pwn(202) : error 079: inconsistent return types (array & non-array)
E:\crystixxv3.pwn(204) : warning 225: unreachable code
E:\crystixxv3.pwn(204) : error 017: undefined symbol "cmdtext"
E:\crystixxv3.pwn(205) : error 017: undefined symbol "playerid"[/hide]