Interior FS into Gamemode
#10

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
change
public OnPlayerCommandText(playerid, cmdtext[])
to
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
You didn't even convert it, read my comment!
change it to this...
PHP код:
public OnPlayerCommandPerformed(playeridcmdtext[], success)
{
new 
cmd[256], idxtmp[256], string[256];
cmd strtok(cmdtextidx);
if(
strcmp(cmd"/int"true) == 0)
{
if(
IsPlayerConnected(playerid))
{
tmp strtok(cmdtextidx);
if(!
strlen(tmp))
{
SendClientMessage(playerid0xFFFFFFAA"USAGE: /int [id]");
return 
1;
}
new 
playa;
playa strval(tmp);
if(
playa 146 && playa >= 0)
{
format(stringsizeof(string), "Int %d: %s"playaIntName[playa]);
SendClientMessage(playerid0xFFFFFFAAstring);
SetPlayerInterior(playeridIntArray2[playa][0]);
SetPlayerPos(playeridIntArray[playa][0], IntArray[playa][1], IntArray[playa][2]);
SetPlayerFacingAngle(playeridIntArray[playa][3]);
return 
1;
}
}
return 
1;
}
if(
strcmp(cmd"/intlist"true) == 0)
{
if(
IsPlayerConnected(playerid))
{
tmp strtok(cmdtextidx);
if(!
strlen(tmp))
{
SendClientMessage(playerid0xFFFFFFAA"USAGE: /intlist [startid]");
return 
1;
}
new 
playa;
playa strval(tmp);
if(
playa 146 && playa >= 0)
{
format(stringsizeof(string), "Int %d: %s"playaIntName[playa]);
SendClientMessage(playerid0xFFFFFFAAstring);
new 
intid playa+1;
while(
intid playa+10)
{
if(
intid 146 && intid >= 0)
{
format(stringsizeof(string), "Int %d: %s"intidIntName[intid]);
SendClientMessage(playerid0xFFFFFFAAstring);
}
intid += 1;
}
return 
1;
}
}
return 
1;
}
if(!
sucess) return 0;
else return 
1;

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: 2 Guest(s)