Interior FS into Gamemode
#8

Is it possibile to convert this in a CMD command type?
If it is possibile, can you help me?

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd[256], idx, tmp[256], string[256];
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/int", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /int [id]");
return 1;
}
new playa;
playa = strval(tmp);
if(playa < 146 && playa >= 0)
{
format(string, sizeof(string), "Int %d: %s", playa, IntName[playa]);
SendClientMessage(playerid, 0xFFFFFFAA, string);
SetPlayerInterior(playerid, IntArray2[playa][0]);
SetPlayerPos(playerid, IntArray[playa][0], IntArray[playa][1], IntArray[playa][2]);
SetPlayerFacingAngle(playerid, IntArray[playa][3]);
return 1;
}
}
return 1;
}
if(strcmp(cmd, "/intlist", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, 0xFFFFFFAA, "USAGE: /intlist [startid]");
return 1;
}
new playa;
playa = strval(tmp);
if(playa < 146 && playa >= 0)
{
format(string, sizeof(string), "Int %d: %s", playa, IntName[playa]);
SendClientMessage(playerid, 0xFFFFFFAA, string);
new intid = playa+1;
while(intid < playa+10)
{
if(intid < 146 && intid >= 0)
{
format(string, sizeof(string), "Int %d: %s", intid, IntName[intid]);
SendClientMessage(playerid, 0xFFFFFFAA, string);
}
intid += 1;
}
return 1;
}
}
return 1;
}
return 0;
}

Reply


Messages In This Thread
Interior FS into Gamemode - by spyro9696 - 04.01.2018, 20:32
Re: Interior FS into Gamemode - by RogueDrifter - 04.01.2018, 20:35
Re: Interior FS into Gamemode - by DaniceMcHarley - 04.01.2018, 20:36
Re: Interior FS into Gamemode - by spyro9696 - 04.01.2018, 20:45
Re: Interior FS into Gamemode - by spyro9696 - 04.01.2018, 20:51
Re: Interior FS into Gamemode - by RogueDrifter - 04.01.2018, 21:05
Re: Interior FS into Gamemode - by spyro9696 - 04.01.2018, 21:11
Re: Interior FS into Gamemode - by spyro9696 - 04.01.2018, 22:07
Re: Interior FS into Gamemode - by spyro9696 - 05.01.2018, 08:47
Re: Interior FS into Gamemode - by RogueDrifter - 05.01.2018, 12:31

Forum Jump:


Users browsing this thread: 3 Guest(s)