Script Help -
EthanCortez - 28.09.2012
Код HTML:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/afk", true, 4) == 0)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, 24);
SendClientMessage(playerid, 0xFF0000AA, "You have gone AFK..");
SetPlayerVirtualWorld(playerid, 1337);
TogglePlayerControllable(playerid, 0);
return 1;
}
if(strcmp(cmdtext, "/back", true, 5) == 0)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, 24);
SendClientMessage(playerid, 0xFF0000AA, "You've Back from AFK..");
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid, 1);
return 1;
}
if(strcmp(cmdtext, "/aa", true) == 0)
{
SetVehiclePos(GetPlayerVehicleID(playerid), 1404.1338,2436.8818,16.5000);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1404.1338,2436.8818,16.5000);
GameTextForPlayer(playerid,"Abandon Airport",4000,6);
return 1;
}
if(strcmp(cmdtext, "/islanddm", true) == 0)
{
SetPlayerInterior(playerid, 0);
RemovePlayerFromVehicle(playerid);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid, 1372.8043,-3284.4734,3.1422);
GivePlayerWeapon(playerid, 22, 5200);
GivePlayerWeapon(playerid, 27, 1100);
GivePlayerWeapon(playerid, 31, 4000);
GameTextForPlayer(playerid,"Island Dm",4000,6);
return 1;
}
if(strcmp(cmdtext, "/lvairstunt", true) == 0)
{
SetVehiclePos(GetPlayerVehicleID(playerid), 1066.05,1319.98,247.50);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1066.05,1319.98,247.50);
GameTextForPlayer(playerid,"Use /Carmenu for vehicles!!",4000,6);
return 1;
}
}
Is there any wrong? if so fix it and reply the right, please!
Re: Script Help -
ikbenremco - 28.09.2012
Do you get errors or sumthing ?
If yes, Show us error line.
Re: Script Help -
EthanCortez - 28.09.2012
Код HTML:
C:\Users\mahmoud\Desktop\SAMP Server\pawno\Untitled.pwn(142) : warning 209: function "OnPlayerCommandText" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
That's what show me when I pressed to RUN it to the server.
Re: Script Help -
Mr.Anonymous - 28.09.2012
Use this
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/afk", true, 4) == 0)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, 24);
SendClientMessage(playerid, 0xFF0000AA, "You have gone AFK..");
SetPlayerVirtualWorld(playerid, 1337);
TogglePlayerControllable(playerid, 0);
return 1;
}
if(strcmp(cmdtext, "/back", true, 5) == 0)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, 24);
SendClientMessage(playerid, 0xFF0000AA, "You've Back from AFK..");
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid, 1);
return 1;
}
if(strcmp(cmdtext, "/aa", true) == 0)
{
SetVehiclePos(GetPlayerVehicleID(playerid), 1404.1338,2436.8818,16.5000);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid, 1404.1338,2436.8818,16.5000);
GameTextForPlayer(playerid,"Abandon Airport",4000,6);
return 1;
}
if(strcmp(cmdtext, "/islanddm", true) == 0)
{
SetPlayerInterior(playerid, 0);
RemovePlayerFromVehicle(playerid);
ResetPlayerWeapons(playerid);
SetPlayerPos(playerid, 1372.8043,-3284.4734,3.1422);
GivePlayerWeapon(playerid, 22, 5200);
GivePlayerWeapon(playerid, 27, 1100);
GivePlayerWeapon(playerid, 31, 4000);
GameTextForPlayer(playerid,"Island Dm",4000,6);
return 1;
}
if(strcmp(cmdtext, "/lvairstunt", true) == 0)
{
SetVehiclePos(GetPlayerVehicleID(playerid), 1066.05,1319.98,247.50);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 0.0);
LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
SetPlayerInterior(playerid, 0);
SetPlayerPos(playerid,1066.05,1319.98,247.50);
GameTextForPlayer(playerid,"Use /Carmenu for vehicles!!",4000,6);
return 1;
}
return 1;
}
Re: Script Help -
EthanCortez - 28.09.2012
I used yours but there one error left it's
Код HTML:
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
If you understand what this error post a reply the right thing, waiting your reply.
Re: Script Help -
RaZzZzoR - 28.09.2012
That's not a error, that means everything is ok :P
Re: Script Help -
Scrillex - 28.09.2012
That isn't a error.. Script complited witout errors! You can use it now easy...
Re: Script Help -
Mr.Anonymous - 28.09.2012
You have alot to learn in PAWN.. :P
Re: Script Help -
EthanCortez - 28.09.2012
Lol, I see
Re: Script Help -
EthanCortez - 28.09.2012
It's won't work?