08.09.2012, 16:13
Help Me please
pawn Код:
CMD:tune(playerid,params[])
{
{
if(isnull(params))
{
SendClientMessage(playerid, red, "Usage:/tune [1-4] To Teleport To The Tune Garages");
return 1;
}
if(strcmp(params,"1",true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //They are driving a vehicle
{
SetVehiclePos(GetPlayerVehicleID(playerid), -1935.985, 231.728, 34.1546);
}
else //They are on-foot or a passenger
{
SetPlayerPos(playerid, -1935.985, 231.728, 34.1546);
SendClientMessageToAll(playerid, yellow, "%s Has been teleported at Tune 1",dsname);
new dsname[MAX_PLAYER_NAME];
new string[128];
format(string, sizeof(string), "~B~You Teleported at ~R~Tune 1");
GameTextForPlayer(playerid, string, 3000, 4);
}
}
else if(strcmp(params,"2",true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //They are driving a vehicle
{
SetVehiclePos(GetPlayerVehicleID(playerid), -2709.731, 217.423, 4.179);
}
else //They are on-foot or a passenger
{
SetPlayerPos(playerid, -2709.731, 217.423, 4.179);
new dsname[MAX_PLAYER_NAME];
new string[128];
SendClientMessageToAll(playerid, yellow, "%s Has been teleported at Tune 2",dsname);
format(string, sizeof(string), "~B~You Teleported at ~r~Tune 2");
GameTextForPlayer(playerid, string, 3000, 4);
}
}
else if(strcmp(params,"3",true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //They are driving a vehicle
{
SetVehiclePos(GetPlayerVehicleID(playerid), 2386.802, 1036.320, 10.280);
}
else //They are on-foot or a passenger
{
SetPlayerPos(playerid, 2386.802, 1036.320, 10.280);
new dsname[MAX_PLAYER_NAME];
new string[128];
SendClientMessageToAll(playerid, yellow, "%s Has been teleported at Tune 3",dsname);
format(string, sizeof(string), "~B~You Teleported at ~R~Tune 3");
GameTextForPlayer(playerid, string, 3000, 4);
}
}
else if(strcmp(params,"4",true) == 0)
{
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //They are driving a vehicle
{
SetVehiclePos(GetPlayerVehicleID(playerid), 2644.976, -2030.903, 13.554);
}
else //They are on-foot or a passenger
{
SetPlayerPos(playerid, 2644.976, -2030.903, 13.554);
new dsname[MAX_PLAYER_NAME];
new string[128];
SendClientMessageToAll(playerid, yellow, "%s Has been teleported at Tune 4",dsname);
format(string, sizeof(string), "~B~You Teleported at ~R~Tune 4");
GameTextForPlayer(playerid, string, 3000, 4);
}
}
}
return 1;
}
pawn Код:
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(39378) : warning 204: symbol is assigned a value that is never used: "dsname"
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(39398) : error 035: argument type mismatch (argument 2)
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(39414) : error 035: argument type mismatch (argument 2)
C:\Users\carlo\Desktop\SA-MP Server\RolePlay\gamemodes\SATDM_v11.pwn(39430) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.