SA-MP Forums Archive
help me with this one please - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help me with this one please (/showthread.php?tid=288370)



help me with this one please - adios1 - 07.10.2011

ok so all i wanna make is make a teleport that send to all players. for example. I go to /sf and it will announce to all players that I go to /sf


So I have this one.

if(!strcmp(cmdtext, "/sf", true))
{
if(IsPlayerInAnyVehicle(playerid))
{
SetVehiclePos(GetPlayerVehicleID(playerid), -2031.5537,174.0473,28.4972);
SetVehicleZAngle(GetPlayerVehicleID(playerid), 269.5064);
LinkVehicleToInterior(GetPlayerVehicleID(playerid) , 0);
new string[50];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,1;
format(string, sizeof(string), "[%s]: Has Done >> /sf << Why Not Join Him?",name);
SendClientMessageToAll(0xFFFFFFF,string);
}
else
{
SetPlayerPos(playerid, -2033.0007,148.0766,28.8359);
SetPlayerFacingAngle(playerid, 267.6227);
}
SetPlayerInterior(playerid, 0);
GameTextForPlayer(playerid,"San Fierro",4000,6);
return 1;
}

after the compilation there are no errors found. but in game there are no announce. so what could be wrong here?


Re: help me with this one please - Pharrel - 07.10.2011

pawn Код:
SendClientMessageToAll(COLOR, "MESSAGE");



Re: help me with this one please - Jafet_Macario - 07.10.2011

pawn Код:
if(!strcmp(cmdtext, "/sf", true))
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        SetVehiclePos(GetPlayerVehicleID(playerid), -2031.5537,174.0473,28.4972);
        SetVehicleZAngle(GetPlayerVehicleID(playerid), 269.5064);
        LinkVehicleToInterior(GetPlayerVehicleID(playerid) , 0);
    }
    else
    {
        SetPlayerPos(playerid, -2033.0007,148.0766,28.8359);
        SetPlayerFacingAngle(playerid, 267.6227);
    }
    new string[50], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(string, sizeof(string), "[%s]: Has Done >> /sf << Why Not Join Him?",name);
    SendClientMessageToAll(0xFFFFFFF,string);
    SetPlayerInterior(playerid, 0);
    GameTextForPlayer(playerid,"San Fierro",4000,6);
    return 1;
}



Re: help me with this one please - adios1 - 07.10.2011

Quote:
Originally Posted by Pharrel
Посмотреть сообщение
pawn Код:
SendClientMessageToAll(COLOR, "MESSAGE");
what do you mean by this? sorry im a noob scripter


Re: help me with this one please - adios1 - 07.10.2011

Quote:
Originally Posted by Jafet_Macario
Посмотреть сообщение
pawn Код:
if(!strcmp(cmdtext, "/sf", true))
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        SetVehiclePos(GetPlayerVehicleID(playerid), -2031.5537,174.0473,28.4972);
        SetVehicleZAngle(GetPlayerVehicleID(playerid), 269.5064);
        LinkVehicleToInterior(GetPlayerVehicleID(playerid) , 0);
    }
    else
    {
        SetPlayerPos(playerid, -2033.0007,148.0766,28.8359);
        SetPlayerFacingAngle(playerid, 267.6227);
    }
    new string[50], name[MAX_PLAYER_NAME];
    GetPlayerName(playerid,name,sizeof(name));
    format(string, sizeof(string), "[%s]: Has Done >> /sf << Why Not Join Him?",name);
    SendClientMessageToAll(0xFFFFFFF,string);
    SetPlayerInterior(playerid, 0);
    GameTextForPlayer(playerid,"San Fierro",4000,6);
    return 1;
}

Thank you so much for this! Cheers Buddy!